I have nested my eyes, I can't wear it. I didn't have a sense of work. I looked at "Sword of Jianxian-Sword". The Internet is still a fire, but it is clear that it is a hodgepodge, and it is not as good as a hike. The medium-term written is not bad, attracting me to see the second part, Huang Gang appeared, and threw the book away. God knows that it will take the dust and Xiaoqiang to see it, hey, a good book is hard to find! --------------------------------- Define your own anomaly, usually there are two constructor, one without any parameters A string as a parameter, the latter case, should call Super () in the constructor to ensure that the string is applied to the normal position in the abnormality. eg: public class WorkflowException extends Exception {public WorkflowException () {} public WorkflowException (String msg) {super (msg);}} call the method that after his business methods declared join throwseg: public int wfDefOrgModel (String userID, HttpServletRequest request "Throws WorkflowAppexception, SQLException {}
Using TRY {} catch {} can handle exceptions, using throws {} to pass exceptions If you want to process an entry in the method, it is also desirable to pass an exception to the caller, combined with ThROWS, TRY, THROW statement. EG: PUBLIC VOID WFDEFORGMODEL (String Userid) THROWS IOException {Message Mr = New Message (); try {mr.load ();} catch (ioexception e) {// do something to handle the IO exception throw e; // transmission Excessive anomaly reduces Java processing speed using too much exception.