package exception
- Alphabetic
- By Inheritance
- exception
- ContextLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
class
ContextRuntimeException extends RuntimeException
Models a RuntimeException that also records the context in which it was thrown.
Models a RuntimeException that also records the context in which it was thrown.
The context is stored in the exception message together with the message itself (if any) sent by the user.
Raise this exception to terminate the application. You should catch recoverable exceptions inside the functions, instead of propagating them to the processing library. If an exception needs to be propagated, consider wrapping it in ContextRuntimeException to aid with tracking and debugging. Any uncaught exception stops the processing and aborts the commit to the output catalog.
-
class
ExceptionContainer extends ContextRuntimeException
Stores an array of exceptions.
Value Members
-
def
classForLogger: Class[_]
Override this to change the class that is displayed in logs.
Override this to change the class that is displayed in logs.
- Attributes
- protected
- Definition Classes
- ContextLogging
-
final
lazy val
logger: ContextAwareLogger
The logger to use for normal and context-aware messages.
The logger to use for normal and context-aware messages.
- Attributes
- protected
- Definition Classes
- ContextLogging
-
def
tryAndRethrow[T](f: ⇒ T, rethrowMessage: ⇒ String): T
Executes a closure and in case of an exception it rethrows a scala.RuntimeException with a message sent by the user.
Executes a closure and in case of an exception it rethrows a scala.RuntimeException with a message sent by the user.
- T
the parameter of the result
- f
the function
- rethrowMessage
the message to be added to the exception
- returns
the item calculated by the closure
- Exceptions thrown
scala.RuntimeException
rethrowing the exception coming from DataStore- Note
it is useful to augment exceptions issued by the DataStoreClient component with information related to the catalog id
-
def
tryAndRethrowWithContext[T](f: ⇒ T): T
Executes a closure and in case of an exception it bundles it with the context causing the error and then rethrows the exception.
Executes a closure and in case of an exception it bundles it with the context causing the error and then rethrows the exception.
- T
the parameter of the result
- f
the function
- returns
the item calculated by the closure
- Exceptions thrown
ContextRuntimeException
rethrowing the exception coming from the closure- Note
it is useful to augment exceptions issued by the DataStoreClient component with information related to the catalog id
-
def
tryAndRethrowWithContext[T](f: ⇒ T, rethrowMessage: ⇒ String): T
Executes a closure and in case of an exception it bundles it with the context causing the error and then rethrows the exception.
Executes a closure and in case of an exception it bundles it with the context causing the error and then rethrows the exception.
- T
the parameter of the result
- f
the function
- rethrowMessage
error message
- returns
the item calculated by the closure
- Exceptions thrown
ContextRuntimeException
rethrowing the exception coming from the closure
-
def
wrapInTryWithContext[T](f: ⇒ T): Try[T]
Executes a closure.
Executes a closure. If the result is an IllegalArgumentException, bundles it with the context causing the error and wraps in Failure. If the result is any other exception, bundles it with the context and rethrows. If the result has been computed without exception, wraps it in Success.
- f
the closure
- Note
that an intercepted IllegalArgumentException is copied to ensure we never try to serialize derived exceptions; failing to do so would result in hard-to-debug serialization errors.
- object ContextRuntimeException extends Serializable
- object Implicits