| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- package xin.glue.ui.G.G02;
- import com.posdata.glue.PosException;
- import com.posdata.glue.biz.activity.PosActivity;
- import com.posdata.glue.biz.constants.PosBizControlConstants;
- import com.posdata.glue.context.PosContext;
- import com.posdata.glue.dao.PosDaoException;
- public class PosErrorHandler extends PosActivity
- {
- public String runActivity(PosContext ctx)
- {
- System.out.println("XinHandleError runActivity START...");
-
- String message = "";
- Throwable th = ctx.getException();
-
- System.out.println("XinHandleError getMessages:"+ctx.getMessages());
-
- // System.out.println("XinHandleError SearchSlabCutting:"+ctx.getGlueProperty("resultkey"));
- // System.out.println("XinHandleError getBeanFactory:"+ctx.getBeanFactory());
- // System.out.println("XinHandleError getAllRequestAttrs:"+ctx.getBeanFactory());
- System.out.println("XinHandleError getAllRequestParameters:"+ctx.getAllRequestParameters());
- System.out.println("XinHandleError th:"+th);
-
-
- if (th != null)
- {
-
- if (th instanceof PosDaoException)
- {
- message = "DB connect ERROR ";
- }
- else if (th instanceof PosException)
- {
- message = " SYSTEM ERROR ";
- }
- ctx.setException(new PosException(message));
- }
- System.out.println("XinHandleError message:"+message);
-
- this.rollbackTransaction("tx1");
- return PosBizControlConstants.SUCCESS;
-
- }
- }
|