Created
October 4, 2012 00:23
-
-
Save qmx/3830761 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// on ag-controller | |
public interface HttpStatusAwareException { | |
public int getStatus(); | |
} | |
// on ag-controller, DefaultRouter:L~88 | |
} catch (Exception e) { | |
if (e instanceof HttpStatusAwareException) { | |
response.setStatus(((HttpStatusAwareException)e).getStatus()); | |
} | |
throw new ServletException(e); | |
} | |
// on ag-security | |
public class GetOuttaHereException extends RuntimeException implements HttpStatusAwareException { | |
.... | |
} | |
// on ag-security, after the failed check | |
throw new GetOuttaHereException(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment