mirror of
https://github.com/ZSCNetSupportDept/WechatTicketSystem.git
synced 2025-11-02 11:16:19 +08:00
improve exception handle
This commit is contained in:
@@ -79,10 +79,10 @@ public class TicketSubmit extends HttpServlet {
|
||||
return new Response(Response.ResponseCode.ILLEGAL_PARAMETER);
|
||||
} catch (HibernateException e) {
|
||||
e.printStackTrace();
|
||||
return new Response(Response.ResponseCode.DATABASE_ERROR);
|
||||
return new Response(Response.ResponseCode.DATABASE_ERROR, e.getMessage());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return new Response(Response.ResponseCode.INTERNAL_ERROR, e);
|
||||
return new Response(Response.ResponseCode.INTERNAL_ERROR, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user