Package nz.org.riskscape.problem
package nz.org.riskscape.problem
-
ClassDescriptionClass used for describing errors and other issues with user defined input.Interface for enums that describe a set of
ProblemCodes - seeStandardCodesfor an example.Thrown fromResultOrProblems.getOrThrow()as an alternative to using functional style flow control in your code withResultOrProblems.A function call that will either return an object or throw aProblemException.Alternative toProblemException.Callthat accepts a list of problems to return in the resultThe Problems interface exists to abstract over a singleProblemor a collection of them (ProblemList), because most of the time when dealing with errors it doesn't matter whether you have one or many, you just want to pass one or more around.A place for problems to fall down when the user should know about them, but they're not going to stop execution.Thrown whenResultOrProblems.get()is called and there is no result.An optional-esque that contains the result of some result-yielding operation where it may have had problems which might have stopped it from producing a result.A pre-defined set of common types of problems.