PackageCn.edu.hbcf.common.vo;ImportJava.io.PrintWriter;ImportJava.io.StringWriter;/*** EXT Exception return Object * *@authorLipenghui*/ Public classExceptionreturn {/*** Whether successful*/ Private Booleansuccess; /*** Exception Message*/ PrivateObject Exceptionmessage; PublicExceptionreturn () {}/*** How to construct the exception when * *@paramMSG * Exception message*/ PublicExceptionreturn (Throwable exceptionmessage) {stringwriter SW=NewStringWriter (); PrintWriter PW=NewPrintWriter (SW); Exceptionmessage.printstacktrace (PW); //Abnormal conditions This. Success =false; This. Exceptionmessage =Exceptionmessage.getmessage (); } Public Booleanissuccess () {returnsuccess; } Public voidSetsuccess (Booleansuccess) { This. Success =success; } PublicObject getexceptionmessage () {returnExceptionmessage; } Public voidsetexceptionmessage (Object exceptionmessage) { This. Exceptionmessage =Exceptionmessage; }}
Ext Anomaly, Exceptionreturn