zoukankan      html  css  js  c++  java
  • Atitit. atiJavaExConverter4js  新的特性

    Atitit. atiJavaExConverter4js  新的特性

     

     

    1.1. V1新特性1

    1.2. V2 新特性1

    2Keyword1

    3Catch1

    4Convert n Throw ex2

    5--atiex2

     

    1.1. V1新特性

    Java ex convert

    1.2. V2 新特性

    Catch 不同的ex

    2. Keyword

    Try catch的库方式实现

    Ajaxerror catch

    Ex.js

     

    作者:: 绰号:老哇的爪子 ( 全名::Attilax Akbar Al Rapanui 阿提拉克斯 阿克巴 阿尔 拉帕努伊 ) 汉字名:艾龙,  EMAIL:1466519819@qq.com

    转载请注明来源: http://www.cnblogs.com/attilax/

     

    3. Catch

    Ajax  catch

      window.onerror=function(errorMessage, scriptURI, lineNumber, columnNumber, error)

      { 

      if(catchEx(error,"com.attilax.user.NotLoginEx"))

    logx("not login");

      else

      logx("logined");

      }

     

     

    4. Convert n Throw ex

    processJavaEx_V2q315(data);

     

     

    5. --atiex

     

    function processJavaEx_V2q315(data)

    {

    if(typeof data=="string")

    {

    try{

      data = eval(  "(" + data + ")"   );

    }catch(e)

    {

    //alert(e);

    //yaosh puton str zeu return;

    if(e instanceof ReferenceError)

    return

    //return e;

    }

      

      

    }

     

      if(data["@type"]!=null && data["@type"]=="java.lang.RuntimeException")

      {

      if(data.message!=null)

      logx(data.message);

     throw data.message;

      }

        if(data["@type"]!=null && data["@type"]=="java.lang.Exception")

      {

      if(data.message!=null)

      logx(data.message);

     throw data.message;

      }

      if(data["stackTrace"]!=null)

       {

      if(data.message!=null)

      logx(data.message);

      throw data;

      }

      

      if(data["xdebug_message"]!=null)  

       {

    //  if(data.xdebug_message!=null)

      logx(data.xdebug_message);

      throw data.xdebug_message;

      }

      else

     return false;

    }

     

     

    function catchEx(e,exname)

    {

    if(e["@type"]==exname)

    return true;

    else 

    return false;

    }

  • 相关阅读:
    HTTP学习笔记(1)ULR语法
    wsdl地址如何在远程服务器上查看源码?
    java线程详解(三)
    java线程详解(二)
    java线程详解(一)
    java中this用法总结
    Linux运行python程序
    如何获取到Java对象的地址
    IDEA 远程调试
    linux环境中mysql默认端口3306无法连接问题排查
  • 原文地址:https://www.cnblogs.com/attilax/p/5281963.html
Copyright © 2011-2022 走看看