Package com.github.dakusui.exception
package com.github.dakusui.exception
ExceptionComposer mechanism
In order to compose an informative error message, we sometime need an extra parameter to a function.
For instance, if you want to include a file name in an error message, you need a file name.
If you are going to open a file, and it fails, it is natural to receive a file name as an argument.
However, when you are processing a data in a java.io.InputStream, and you find a wrong byte in it, you can not access the file from which you find the erroneous data.
-
ClassDescriptionExceptionContext<K extends ExceptionContext.Key>An interface that models a context that handles exceptions.ExceptionContext.Entry<K extends ExceptionContext.Key>An entry that can be registered in the
ExceptionContext.ExceptionContext.Factory<K extends ExceptionContext.Key>A factory of anExceptionContextobject.An interface for keys to be used forExceptionContext.ExceptionContext.Manager<K extends ExceptionContext.Key>A manager class of anExceptionContext.ExceptionThrower<K extends ExceptionContext.Key>A class to throw exceptions with contextual and informative messages.