This project has retired. For details please refer to its Attic page.
Apache REEF: Org.Apache.REEF.Common.Api.AbstractFailure Class Reference
Apache REEF  0.15.0
Retainable Evaluator Execution Framework
Public Member Functions | Protected Member Functions | Properties | List of all members
Org.Apache.REEF.Common.Api.AbstractFailure Class Reference

Inherits Org.Apache.REEF.Common.Api.IFailure.

Public Member Functions

Exception AsError ()
 Return the original Java Exception, or generate a new one if it does not exists. More...
 
string GetStackTrace (Exception ex)
 Helper function: produce the string that contains the given exception's stack trace. More...
 
override string ToString ()
 

Protected Member Functions

 AbstractFailure (string id, string message, string description, Exception cause, byte[] data)
 Most detailed error message constructor that takes all parameters possible. More...
 
 AbstractFailure (string id, string message)
 Build error message given the entity ID and the short error message. More...
 
 AbstractFailure (string id, Exception cause)
 Build error message given the failed entity ID and Exception. More...
 
 AbstractFailure (string id, string message, string description)
 Build error message given the entity ID plus short and long error message. More...
 

Properties

string Id [get]
 Identifier of the entity that produced the error. More...
 
string Message [get, set]
 
Optional< string > Description [get, set]
 
Optional< string > Reason [get, set]
 
Optional< Exception > Cause [get, set]
 
Optional< byte[]> Data [get, set]
 
- Properties inherited from Org.Apache.REEF.Common.Api.IFailure
string Message [get, set]
 One-line error message. More...
 
Optional< string > Description [get, set]
 Optional long error description. More...
 
Optional< string > Reason [get, set]
 Exception that caused the error, or null. More...
 
Optional< byte[]> Data [get, set]
 Optional serialized version of the error message. More...
 
- Properties inherited from Org.Apache.REEF.Utilities.IIdentifiable
string Id [get]
 The Id of this object, e.g. More...
 

Constructor & Destructor Documentation

Org.Apache.REEF.Common.Api.AbstractFailure.AbstractFailure ( string  id,
string  message,
string  description,
Exception  cause,
byte[]  data 
)
inlineprotected

Most detailed error message constructor that takes all parameters possible.

Parameters
idIdentifier of the entity that produced the error. Cannot be null.
messageOne-line error message. Cannot be null.
descriptionLong error description. Can be null.
causeException that caused the error. Can be null.
databyte array that contains serialized version of the error. Can be null.
Org.Apache.REEF.Common.Api.AbstractFailure.AbstractFailure ( string  id,
string  message 
)
inlineprotected

Build error message given the entity ID and the short error message.

Parameters
id
message
Org.Apache.REEF.Common.Api.AbstractFailure.AbstractFailure ( string  id,
Exception  cause 
)
inlineprotected

Build error message given the failed entity ID and Exception.

Populates the message with the Exception.getMessage() result, and stores the exception stack trace in the description.

Parameters
id
cause
Org.Apache.REEF.Common.Api.AbstractFailure.AbstractFailure ( string  id,
string  message,
string  description 
)
inlineprotected

Build error message given the entity ID plus short and long error message.

Parameters
id
message
description

Member Function Documentation

Exception Org.Apache.REEF.Common.Api.AbstractFailure.AsError ( )
inline

Return the original Java Exception, or generate a new one if it does not exists.

ALWAYS returns an exception, never null

Implements Org.Apache.REEF.Common.Api.IFailure.

string Org.Apache.REEF.Common.Api.AbstractFailure.GetStackTrace ( Exception  ex)
inline

Helper function: produce the string that contains the given exception's stack trace.

Returns null if the argument is null.

Parameters
ex
override string Org.Apache.REEF.Common.Api.AbstractFailure.ToString ( )
inline

Property Documentation

Optional<Exception> Org.Apache.REEF.Common.Api.AbstractFailure.Cause
getset
Optional<byte[]> Org.Apache.REEF.Common.Api.AbstractFailure.Data
getset
Optional<string> Org.Apache.REEF.Common.Api.AbstractFailure.Description
getset
string Org.Apache.REEF.Common.Api.AbstractFailure.Id
get

Identifier of the entity that produced the error.

Cannot be null.

string Org.Apache.REEF.Common.Api.AbstractFailure.Message
getset
Optional<string> Org.Apache.REEF.Common.Api.AbstractFailure.Reason
getset

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