Apache REEF  0.16.0
Retainable Evaluator Execution Framework
Static Public Member Functions | List of all members
Org.Apache.REEF.Utilities.Diagnostics.Exceptions Class Reference

Static Public Member Functions

static void Throw (Exception exception, string message, Logger logger)
 Call this method to throw an exception. More...
 
static void Throw (Exception exception, Logger logger)
 Call this method to throw an exception. More...
 
static void Caught (Exception exception, Level level, Logger logger)
 Call this method every time when an exception is caught. More...
 
static void Caught (Exception exception, Level level, string message, Logger logger)
 Call this method every time when an exception is caught. More...
 
static void CaughtAndThrow (Exception exception, Level level, Logger logger)
 
static void CaughtAndThrow (Exception exception, Level level, string message, Logger logger)
 

Member Function Documentation

◆ Caught() [1/2]

static void Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Caught ( Exception  exception,
Level  level,
Logger  logger 
)
inlinestatic

Call this method every time when an exception is caught.

Calling this method will trace the exception and do other common processing. This method traces the exception type and message at error level and the full stack trace at all other levels.

try { // Some code that can throw } catch (Exception e) { Exceptions.Caught(e); // Exception handling code }

Parameters
exceptionThe exception being caught.
levelThe log level.
loggerThe logger from the caller class.

◆ Caught() [2/2]

static void Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Caught ( Exception  exception,
Level  level,
string  message,
Logger  logger 
)
inlinestatic

Call this method every time when an exception is caught.

Calling this method will trace the exception and do other common processing. This method traces the exception type and message at error level and the full stack trace at all other levels.

try { // Some code that can throw } catch (Exception e) { Exceptions.Caught(e); // Exception handling code }

Parameters
exceptionThe exception being caught.
levelThe log level.
messageThe additional message to log.
loggerThe Logger from the caller class.

◆ CaughtAndThrow() [1/2]

static void Org.Apache.REEF.Utilities.Diagnostics.Exceptions.CaughtAndThrow ( Exception  exception,
Level  level,
Logger  logger 
)
inlinestatic

◆ CaughtAndThrow() [2/2]

static void Org.Apache.REEF.Utilities.Diagnostics.Exceptions.CaughtAndThrow ( Exception  exception,
Level  level,
string  message,
Logger  logger 
)
inlinestatic

◆ Throw() [1/2]

static void Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw ( Exception  exception,
string  message,
Logger  logger 
)
inlinestatic

Call this method to throw an exception.

Calling this method will trace the exception and do other common processing, and then it will throw the exception. This method traces the exception type and message at error level and the full stack trace at all other levels.

Exceptions.Throw(new Exception("Some exception"));

Parameters
exceptionThe exception to be thrown.
messageThe message from the caller class.
loggerThe logger from the caller class.

◆ Throw() [2/2]

static void Org.Apache.REEF.Utilities.Diagnostics.Exceptions.Throw ( Exception  exception,
Logger  logger 
)
inlinestatic

Call this method to throw an exception.

Calling this method will trace the exception and do other common processing, and then it will throw the exception. This method traces the exception type and message at error level and the full stack trace at all other levels.

Exceptions.Throw(new Exception("Some exception"));

Parameters
exceptionThe exception to be thrown.
loggerThe logger of the caller class.

The documentation for this class was generated from the following file: