net.liftweb.common

Failure

case class Failure (msg: String, exception: Box[Throwable], chain: Box[Failure]) extends EmptyBox with Product with Serializable

A Failure is an EmptyBox with an additional failure message explaining the reason for its being empty. It can also optionally provide an exception or a chain of causes represented as a list of other Failure objects

Attributes
sealed
Annotations
@serializable()
Linear Supertypes
Serializable, Serializable, EmptyBox, Box[Nothing], Product, Equals, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Failure
  2. Serializable
  3. Serializable
  4. EmptyBox
  5. Box
  6. Product
  7. Equals
  8. AnyRef
  9. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Failure (msg: String, exception: Box[Throwable], chain: Box[Failure])

Type Members

  1. type A = Nothing

  2. class WithFilter extends AnyRef

    Play NiceLike with the Scala 2.

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def $ (f: (Box[Nothing]) ⇒ Unit): Box[Nothing]

    Alias for pass

    Alias for pass

    Definition Classes
    Box
  5. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  6. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  7. def === [B >: Nothing] (to: B): Boolean

    Returns true if the value contained in this box is equal to the specified value.

    Returns true if the value contained in this box is equal to the specified value.

    Definition Classes
    Box
  8. def ?~ (msg: String): Failure

    Transform an Empty to a Failure with the specified message.

    Transform an Empty to a Failure with the specified message.

    msg

    the failure message

    returns

    a Failure with the message if this Box is Empty

    Definition Classes
    FailureEmptyBoxBox
  9. def ?~! (msg: String): Failure

    Transform an EmptyBox to a Failure with the specified message and chain the new Failure to any previous Failure represented by this Box.

    Transform an EmptyBox to a Failure with the specified message and chain the new Failure to any previous Failure represented by this Box.

    msg

    the failure message

    returns

    a Failure with the message if this Box is an Empty Box. Chain the messages if it is already a Failure

    Definition Classes
    FailureEmptyBoxBox
  10. def asA [B] (implicit m: Manifest[B]): Box[B]

    Return a Full[B] if the contents of this Box is of type B, otherwise return Empty

    Return a Full[B] if the contents of this Box is of type B, otherwise return Empty

    Definition Classes
    FailureBox
  11. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  12. def canEqual (arg0: Any): Boolean

    Definition Classes
    Failure → Equals
  13. val chain : Box[Failure]

  14. def choice [B] (f1: (Nothing) ⇒ Box[B])(alternative: ⇒ Box[B]): Box[B]

    Apply the function f1 to the contents of this Box if available; if this is empty return the specified alternative.

    Apply the function f1 to the contents of this Box if available; if this is empty return the specified alternative.

    Definition Classes
    Box
  15. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  16. def collect [B] (pf: PartialFunction[Nothing, B]): Box[B]

    If the partial function is defined at the current Box's value apply the partial function.

    If the partial function is defined at the current Box's value apply the partial function.

    Attributes
    final
    Definition Classes
    EmptyBoxBox
  17. def compoundFailMsg (msg: String): Box[Nothing]

    Alias for ?~!

    Alias for ?~!

    Definition Classes
    Box
  18. def dmap [B] (dflt: ⇒ B)(f: (Nothing) ⇒ B): B

    Equivalent to map(f).

    Equivalent to map(f).openOr(Full(dflt))

    Definition Classes
    Box
  19. def elements : Iterator[Nothing]

    Returns an Iterator over the value contained in this Box

    Returns an Iterator over the value contained in this Box

    Definition Classes
    Box
  20. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  21. def equals (other: Any): Boolean

    Determines equality based upon the contents of this Box instead of the box itself.

    Determines equality based upon the contents of this Box instead of the box itself. For Full and Empty, this has the expected behavior. Equality in terms of Failure checks for equivalence of failure causes.

    Definition Classes
    FailureBox → Equals → AnyRef → Any
  22. val exception : Box[Throwable]

  23. def exceptionChain : List[Throwable]

    Get the exception chain along with the exception chain of any chained failures

  24. def exists (func: (Nothing) ⇒ Boolean): Boolean

    Determine whether this Box contains a value which satisfies the specified predicate

    Determine whether this Box contains a value which satisfies the specified predicate

    returns

    true if this Box's value satisfies the specified predicate

    Definition Classes
    Box
  25. def failMsg (msg: String): Box[Nothing]

    Alias for ?~

    Alias for ?~

    Definition Classes
    Box
  26. def failureChain : List[Failure]

    Flatten the Failure chain to a List where this Failure is at the head

  27. def filter (p: (Nothing) ⇒ Boolean): Box[Nothing]

    Return this Box if it contains a value satisfying the specified predicate; Empty otherwise

    Return this Box if it contains a value satisfying the specified predicate; Empty otherwise

    returns

    this Box if it contains a value satisfying the specified predicate; Empty otherwise

    Definition Classes
    EmptyBoxBox
  28. def filterMsg (msg: String)(p: (Nothing) ⇒ Boolean): Box[Nothing]

    Filter this box on the specified predicate, returning a Failure with the specified message if the predicate is not satisfied.

    Filter this box on the specified predicate, returning a Failure with the specified message if the predicate is not satisfied.

    msg

    the failure message

    p

    a predicate

    returns

    a Failure with the message if the predicate is not satisfied by the value contained in this Box

    Definition Classes
    Box
  29. def filterNot (f: (Nothing) ⇒ Boolean): Box[Nothing]

    Creates a Box if the current Box is Full and the value does not satisfy the predicate, f.

    Creates a Box if the current Box is Full and the value does not satisfy the predicate, f.

    f

    the predicate used to test value.

    Definition Classes
    Box
  30. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  31. def flatMap [B] (f: (A) ⇒ Box[B]): Box[B]

    Apply a function returning a Box to the value contained in this Box if it exists and return the result, or empty otherwise.

    Apply a function returning a Box to the value contained in this Box if it exists and return the result, or empty otherwise.

    returns

    the modified Box or empty

    Definition Classes
    FailureBox
  32. def foreach [U] (f: (Nothing) ⇒ U): Unit

    Perform a side effect by calling the specified function with the value contained in this box.

    Perform a side effect by calling the specified function with the value contained in this box.

    Definition Classes
    Box
  33. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  34. def hashCode (): Int

    Definition Classes
    Failure → AnyRef → Any
  35. def isA [B] (cls: Class[B]): Box[B]

    Return a Full[B] if the contents of this Box is an instance of the specified class, otherwise return Empty

    Return a Full[B] if the contents of this Box is an instance of the specified class, otherwise return Empty

    Definition Classes
    FailureBox
  36. def isDefined : Boolean

    Returns true if the box contains a value.

    Returns true if the box contains a value.

    returns

    true if this Box contains a value

    Definition Classes
    Box
  37. def isEmpty : Boolean

    Returns true if this Box contains no value (is Empty or Failure or ParamFailure)

    Returns true if this Box contains no value (is Empty or Failure or ParamFailure)

    returns

    true if this Box contains no value

    Definition Classes
    EmptyBoxBox
  38. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  39. def iterator : Iterator[Nothing]

    Returns an Iterator over the value contained in this Box

    Returns an Iterator over the value contained in this Box

    Definition Classes
    Box
  40. def javaIterator [B >: Nothing] : Iterator[B]

    Get a Java Iterator from the Box

    Get a Java Iterator from the Box

    Definition Classes
    Box
  41. def map [B] (f: (A) ⇒ B): Box[B]

    Apply a function to the value contained in this Box if it exists and return a new Box containing the result, or empty otherwise.

    Apply a function to the value contained in this Box if it exists and return a new Box containing the result, or empty otherwise.

    returns

    the modified Box or empty

    Definition Classes
    FailureBox
  42. def messageChain : String

  43. val msg : String

  44. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  45. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  46. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  47. def openOr [B] (default: ⇒ B): B

    Return the value contained in this Box if it is full; otherwise return the specified default

    Return the value contained in this Box if it is full; otherwise return the specified default

    returns

    the value contained in this Box if it is full; otherwise return the specified default

    Definition Classes
    EmptyBoxBox
  48. def openTheBox : Nothing

    Return the value contained in this Box if it is Full; throw an exception otherwise.

    Return the value contained in this Box if it is Full; throw an exception otherwise. This means "don't use it unless you are 100% sure that the Box is Full and you should probably comment your code with the explanation of the guaranty. The better case for extracting the value out of a Box can be found at http://lift.la/scala-option-lift-box-and-how-to-make-your-co

    returns

    the value contained in this Box if it is full; throw an exception otherwise

    Definition Classes
    Box
  49. def open_! : Nothing

    Return the value contained in this Box if it is Full; throw an exception otherwise.

    Return the value contained in this Box if it is Full; throw an exception otherwise. The method has a '!' in its name. This means "don't use it unless you are 100% sure that the Box is Full and you should probably comment your code with the explanation of the guaranty. The better case for extracting the value out of a Box can be found at http://lift.la/scala-option-lift-box-and-how-to-make-your-co

    returns

    the value contained in this Box if it is full; throw an exception otherwise

    Definition Classes
    FailureEmptyBoxBox
  50. def or [B] (alternative: ⇒ Box[B]): Box[B]

    Return this Box if Full, or the specified alternative if this is empty

    Return this Box if Full, or the specified alternative if this is empty

    Definition Classes
    EmptyBoxBox
  51. def pass (f: (Box[Nothing]) ⇒ Unit): Box[Nothing]

    Perform a side effect by passing this Box to the specified function and return this Box unmodified.

    Perform a side effect by passing this Box to the specified function and return this Box unmodified.

    returns

    this Box

    Definition Classes
    Box
  52. def productArity : Int

    Definition Classes
    Failure → Product
  53. def productElement (arg0: Int): Any

    Definition Classes
    Failure → Product
  54. def productIterator : Iterator[Any]

    Definition Classes
    Product
  55. def productPrefix : String

    Definition Classes
    Failure → Product
  56. def rootExceptionCause : Box[Throwable]

    Gets the deepest exception cause

  57. def run [T] (in: T)(f: (T, Nothing) ⇒ T): T

    This method calls the specified function with the value contained in this Box

    This method calls the specified function with the value contained in this Box

    returns

    the result of the function or a default value

    Definition Classes
    Box
  58. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  59. def toLeft [B] (right: ⇒ B): Either[Nothing, B]

    An Either that is a Right with the given argument right if this is empty, or a Left if this is Fill with the Box's value

    An Either that is a Right with the given argument right if this is empty, or a Left if this is Fill with the Box's value

    Definition Classes
    Box
  60. def toList : List[Nothing]

    Returns a List of one element if this is Full, or an empty list if empty.

    Returns a List of one element if this is Full, or an empty list if empty.

    Definition Classes
    Box
  61. def toOption : Option[Nothing]

    Returns the contents of this box in an Option if this is Full, or None if this is a empty (Empty, Failure or ParamFailure)

    Returns the contents of this box in an Option if this is Full, or None if this is a empty (Empty, Failure or ParamFailure)

    Definition Classes
    Box
  62. def toRight [B] (left: ⇒ B): Either[B, Nothing]

    An Either that is a Left with the given argument left if this is empty, or a Right if this Full with the Box's value.

    An Either that is a Left with the given argument left if this is empty, or a Right if this Full with the Box's value.

    Definition Classes
    Box
  63. def toString (): String

    Definition Classes
    Failure → AnyRef → Any
  64. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  65. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  66. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  67. def withFilter (p: (Nothing) ⇒ Boolean): WithFilter

    Makes Box play better with Scala 2.

    Makes Box play better with Scala 2.8 for comprehensions

    Definition Classes
    Box
  68. def ~> [T] (errorCode: T): ParamFailure[T]

    Transform an Empty to a ParamFailure with the specified typesafe parameter.

    Transform an Empty to a ParamFailure with the specified typesafe parameter.

    errorCode

    a value indicating the error

    returns

    a ParamFailure with the specified value

    Definition Classes
    FailureEmptyBoxBox

Deprecated Value Members

  1. def productElements : Iterator[Any]

    Definition Classes
    Product
    Annotations
    @deprecated
    Deprecated

    use productIterator instead

Inherited from Serializable

Inherited from Serializable

Inherited from EmptyBox

Inherited from Box[Nothing]

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any