Atitit. atiJavaExConverter4js 新的特性
Atitit.?atiJavaExConverter4js??新的特性
?
?
1.1.?V1新特性1
1.2.?V2?新特性1
2.?Keyword1
3.?Catch1
4.?Convert?n?Throw?ex2
5.?--atiex2
?
1.1.?V1新特性
Java?ex?convert
1.2.?V2?新特性
Catch?不同的ex
2.?Keyword
Try?catch的庫方式實現
Ajax的error?catch
Ex.js
?
作者::?綽號:老哇的爪子?(?全名::Attilax?Akbar?Al?Rapanui?阿提拉克斯?阿克巴?阿爾?拉帕努伊?)?漢字名:艾龍,??EMAIL:1466519819@qq.com
轉載請注明來源:?http://blog.csdn.net/attilax
?
3.?Catch
Ajax??catch
??window.οnerrοr=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;
}
轉載于:https://www.cnblogs.com/attilax/p/5963437.html
總結
以上是生活随笔為你收集整理的Atitit. atiJavaExConverter4js 新的特性的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 20160221.CCPP体系详解(00
- 下一篇: ElasticSearch 2 (26)