Error

io.scalaland.chimney.partial.Error
See theError companion object
final case class Error(message: ErrorMessage, path: Path = ...)

Data structure for representing path-annotated error

Value parameters

message

error message

path

error path annotation

Attributes

Since

0.7.0

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Returns a tuple with conventional string representation of a path and error message

Returns a tuple with conventional string representation of a path and error message

Attributes

Since

0.7.0

def prependErrorPath(pathElement: PathElement): Error

Prepends path with a given path element

Prepends path with a given path element

Value parameters

pathElement

path element to be prepended

Attributes

Returns

error with a path prepended with provided path element

Since

0.7.0

Unseals the io.scalaland.chimney.partial.Path of current io.scalaland.chimney.partial.Error.

When derivation is building up the result it automatically appends fields/indices/map keys - however values obtained with withFieldComputed(Partial)(From) contains the whole Path already, so prependErrorPath should be a noop for them.

However, this path can only be precomputed only up to the boundaries of a io.scalaland.chimney.PartialTransformer, and when one transformer calls another, path should be appended again. This method allows this.

Attributes

Returns

error with a path prepended with provided path element

Since

1.6.0

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product