public class ErrorHandler extends Object
Constructor and Description |
---|
ErrorHandler() |
Modifier and Type | Method and Description |
---|---|
static void |
handleInvalidJsonPath(String operation,
Exception e)
Handle invalid/malformed jsonpath exceptions.
|
static void |
handleInvalidXPath(String operation,
Exception e)
Handle invalid/malformed xpath exceptions.
|
static void |
handleJsonException(String reason,
String operation,
Throwable e)
Handle any json related exception.
|
static void |
handleJsonPathException(String operation,
Throwable e)
Handle any jsonpath related exception.
|
static void |
handleMalformedJson(String operation,
Exception e)
Handle any malformed json exception.
|
static void |
handleNonExistingJsonpPath(String operation,
String jsonPath,
Exception e)
Handle non-existing jsonpath exceptions.
|
static void |
handleUndefineHeader(String headerName) |
static void |
handleXMLException(String operation,
Throwable e)
Handle any xpath related exception.
|
static void |
logWarn(String operation,
String msg)
Log a warn.
|
public static void handleInvalidJsonPath(String operation, Exception e)
operation
- Operation that executede
- Exception to handlepublic static void handleNonExistingJsonpPath(String operation, String jsonPath, Exception e)
operation
- Operation that executedjsonPath
- Jsonpathe
- Exception to handlepublic static void handleJsonPathException(String operation, Throwable e)
operation
- Operation that executede
- Throwable to handlepublic static void handleMalformedJson(String operation, Exception e)
operation
- Operation that executede
- Exception to handlepublic static void handleJsonException(String reason, String operation, Throwable e)
reason
- The reason to set as error reasonoperation
- Operation that executede
- Throwable to handlepublic static void handleInvalidXPath(String operation, Exception e)
operation
- Operation that executede
- Exception to handlepublic static void handleXMLException(String operation, Throwable e)
operation
- Operation that executede
- Throwable to handlepublic static void handleUndefineHeader(String headerName)
Copyright © 2019 WSO2. All rights reserved.