Class NavExceptionHelper
java.lang.Object
edu.internet2.middleware.grouper.ui.util.NavExceptionHelper
- All Implemented Interfaces:
Serializable
Helper class centralise some Exception handling
- Version:
- $Id: NavExceptionHelper.java,v 1.3 2009-08-12 04:52:14 mchyzer Exp $
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Exception
Allows code which constructs an Exception to add a stack traceUnrecoverableErrorException can have its own message key and one associated with any 'cause'.Takes class short name for Throwable and builds a key based on that.missingAlternativeParameters
(String... params) Helper method takes alternate parameter / parameter name pairs and constructs a message, if any are empty, indicating what is missingmissingParameters
(String... params) Helper method takes alternate parameter / parameter name pairs and constructs a message, if any are empty, indicating what is missingstatic String
Captures the stack trace for an Exception so it can be logged
-
Field Details
-
LOG
protected static final org.apache.commons.logging.Log LOG
-
-
Constructor Details
-
NavExceptionHelper
public NavExceptionHelper()
-
-
Method Details
-
key
Takes class short name for Throwable and builds a key based on that. If the key is not present a default catch all is used.- Parameters:
t
-- Returns:
- key
-
getMessage
UnrecoverableErrorException can have its own message key and one associated with any 'cause'. This method takes care of building a message based on the available keys.- Parameters:
cause
-- Returns:
- message
-
missingParameters
Helper method takes alternate parameter / parameter name pairs and constructs a message, if any are empty, indicating what is missing- Parameters:
params
-- Returns:
- missing parameters
-
missingAlternativeParameters
Helper method takes alternate parameter / parameter name pairs and constructs a message, if any are empty, indicating what is missing- Parameters:
params
-- Returns:
- missing parameters
-
fillInStacktrace
Allows code which constructs an Exception to add a stack trace- Parameters:
e
-- Returns:
- the input Exception
-
toLog
Captures the stack trace for an Exception so it can be logged- Parameters:
t
-- Returns:
- the stack trace as a String
-