Package com.bea.wcp.diameter
Class MessageException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.bea.wcp.diameter.DiameterException
com.bea.wcp.diameter.MessageException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AvpException
Exception raised if an invalid Diameter message has been encountered.
- Author:
- Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new MessageException for the specified ResultCode and a default error message based on the result code.MessageException(ResultCode rc, String msg) Creates a new MessageException for the specified ResultCode and error message. -
Method Summary
Modifier and TypeMethodDescriptioncreateAnswer(Request req) Creates a new Answer message for an invalid Request.Returns the ResultCode indicating the error.static MessageExceptionunableToComply(String msg) Convenience method that returns a new UNABLE_TO_COMPLY MessageException.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MessageException
Creates a new MessageException for the specified ResultCode and error message.- Parameters:
rc- the Diameter result codemsg- the error message
-
MessageException
Creates a new MessageException for the specified ResultCode and a default error message based on the result code.- Parameters:
rc- the Diameter result code
-
-
Method Details
-
getResultCode
Returns the ResultCode indicating the error.- Returns:
- rc error result code
-
createAnswer
Creates a new Answer message for an invalid Request. The result code for the error will be included in the Answer, as well as an Error-Message AVP for the error message.- Parameters:
req- the Request that was invalid- Returns:
- the error Answer for the request
-
unableToComply
Convenience method that returns a new UNABLE_TO_COMPLY MessageException.- Parameters:
msg- the error cause- Returns:
- the new MessageException
-