java - How do you stop spring swallowing exceptions? -


when fails on server side because database , application out of sync instead of getting error , application crashing spring/tomcat seems swallow exception , pretend nothing has happened.

call me crazy if program fails catastrophically want fail catastrophically! there anyway switch behaviour off? it's slowing development down when server pretends fine when it's thrown logs.

if isn't spring/tomcat default else might causing it? using boatload of libraries , frameworks unfortunately. spring usual suspect else.

update

it's sql server database connecting using sqlserverdatasource. hibernate in use in parts of project used query database @ login time. on client side using extjs , using extdirectspring annotate methods client side talk to. translate data going across wire there's jackson, gets wrapped extdirect json handler.

there's aop stuff going on thats logging exceptions deleting code results in same behaviour.

further update

ok not idea let sever crash! see answer below proposed middle ground.

if want (but imho should not ...) can use filter block application once let uncaught exception go. :

public class crashfilter implements filter {     private boolean crashed = false;     private string msg = "major problem : application stopped";      @override     public void dofilter(servletrequest sr, servletresponse sr1, filterchain fc) throws ioexception, servletexception {         if (crashed) {             httpservletresponse resp = (httpservletresponse) sr1;             resp.senderror(httpservletresponse.sc_internal_server_error, msg);             return;         }         try {             fc.dofilter(sr, sr1);         }         catch (exception ex) {             crashed = true;             throw new servletexception(ex);         }     }     // init , destroy omitted brevity } 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -