Skip to content

Instantly share code, notes, and snippets.

@LightGuard
Created October 14, 2011 02:12
Show Gist options
  • Save LightGuard/1286076 to your computer and use it in GitHub Desktop.
Save LightGuard/1286076 to your computer and use it in GitHub Desktop.
public void handleAuthorizationException(@Handles CaughtException<AuthorizationException> evt) {
String newTrace = new ExceptionStackOutput(evt.getException(), new StackFrameFilter() {
public StackFrameFilterResult process(StackFrame frame) {
return StackFrameFilterResult.TERMINATE;
}).printTrace();
messages.error("You do not have the necessary permissions to perform that operation", "");
evt.handled();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment