Search in sources :

Example 1 with ResourceError

use of com.yahoo.athenz.zms.ResourceError in project athenz by yahoo.

the class ZMSUtils method error.

public static RuntimeException error(int code, String msg, String caller) {
    LOG.error("Error: {} code: {} message: {}", caller, code, msg);
    // emit our metrics if configured. the method will automatically
    // return from the caller if caller is null
    emitMonmetricError(code, caller);
    return new ResourceException(code, new ResourceError().code(code).message(msg));
}
Also used : ResourceError(com.yahoo.athenz.zms.ResourceError) ResourceException(com.yahoo.athenz.zms.ResourceException)

Aggregations

ResourceError (com.yahoo.athenz.zms.ResourceError)1 ResourceException (com.yahoo.athenz.zms.ResourceException)1