Atitit.跨语言异常转换机制 java c# php到js的异常转换

来源:互联网 发布:mac上可以玩什么网游 编辑:程序博客网 时间:2024/06/05 02:39

Atitit.跨语言异常转换机制java c# phpjs的异常转换

 

 

1.bizEx   直接抓取,然后js catchEX1

2.Chkec runtimeEx1

3.Other异常。。Js convet 2 js err,then throw ...2

 

 

1. bizEx   直接抓取,然后js catchEX

  try{

   processJavaEx_V2q315(data);

   }catch(e)

   {

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

  {

//  alert("not login,正在转往登陆界面");

logx("not login");

window.location="../user/login.html";

  }

  else{

  logx("logined");

  //alert("login");

  }

   }

 

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

转载请注明来源: http://blog.csdn.net/attilax

2. Chkec runtimeEx

 

Runtime异常  exmsg  fmt  ::  chkex,not_login_ex,xxxxxxxx

If判断,if startwith(ati)

     Xxxx

 

 

  try{

  callback_checkJavaEx(data);

  }catch(e)

  {

  var o=str2json(data);

  if(o.message.startWith("chkex"))

  {

     logx(o.message);

     var a=o.message.split(",");

  alert(a[2]);

  return;

  }

  

  showErr(e);

  return;

  }

 

3. Other异常。。Js convet 2 js err,then throw ...

 

0 0