com.sap.cds.repackaged.audit.api.exception.AuditLogWriteException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cds-feature-auditlog-v2 Show documentation
Show all versions of cds-feature-auditlog-v2 Show documentation
Handler to send auditlog messages to AuditLog Service V2
package com.sap.cds.repackaged.audit.api.exception;
import java.util.HashMap;
import java.util.Map;
/**
* This class defines the exception that can be thrown by the logging infrastructure in case
* the audit log message cannot be delivered to the destination storage.
* It is strongly recommended to catch this exception and do the necessary to keep
* the audit log records and the reality consistent. This may include reverting the audited action
* in case the action cannot be audited.
*
* Example:
*
* try {
* auditLogMessage.log();
* } catch (AuditLogWriteRuntimeException auditException) {
* // do The Revert Procedure or other actions
* }
*
*/
public class AuditLogWriteException extends AuditLogException {
private static final long serialVersionUID = -8966993609463751302L;
private Map errors = new HashMap();
/**
* @see java.lang.RuntimeException
*/
public AuditLogWriteException() {
super();
}
/**
* @see java.lang.RuntimeException
*
* @param message Message of the exception.
* @param exception The exception object.
*/
public AuditLogWriteException(String message, Throwable exception) {
super(message, exception);
}
/**
* @see java.lang.RuntimeException
*
* @param message Message of the exception.
*/
public AuditLogWriteException(String message) {
super(message);
}
/**
* @see java.lang.RuntimeException
*
* @param exception The exception object.
*/
public AuditLogWriteException(Throwable exception) {
super(exception);
}
public AuditLogWriteException(String message, Map errors) {
super(message);
this.errors = errors;
}
public Map getErrors() {
return errors;
}
}