o

busymachines.core

MeaningfulAnomalies

object MeaningfulAnomalies

Some suggested naming conventions are put here so that they're easily accessible. These can also be found in the scaladoc of busymachines.core.AnomalyID

- busymachines.core.MeaningfulAnomalies.NotFound

  • range: 000-099; e.g. pone_001, ptwo_076, pthree_099

- busymachines.core.MeaningfulAnomalies.UnauthorizedMsg

  • range: 100-199; e.g. pone_100, ptwo_176, pthree_199

- busymachines.core.MeaningfulAnomalies.ForbiddenMsg

  • range: 200-299; e.g. pone_200, ptwo_276, pthree_299

- busymachines.core.MeaningfulAnomalies.DeniedMsg

  • range: 300-399; e.g. pone_300, ptwo_376, pthree_399

- busymachines.core.MeaningfulAnomalies.InvalidInput

  • range: 400-499; e.g. pone_400, ptwo_476, pthree_499
Since

26 Dec 2017

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MeaningfulAnomalies
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait Conflict extends AnyRef

    Special type of invalid input

    Special type of invalid input

    E.g. when you're duplicating something that ought to be unique, like ids, emails.

  2. trait Denied extends AnyRef

    Meaning:

    Meaning:

    "you know it exists, but you are not allowed to see it"

  3. trait Forbidden extends AnyRef

    Meaning:

    Meaning:

    "it exists, but you're not even allowed to know about that; so for short, you can't find it".

  4. trait InvalidInput extends AnyRef

    Obviously, whenever some input data is wrong.

    Obviously, whenever some input data is wrong.

    This one is probably your best friend, and the one you have to specialize the most for any given problem domain. Otherwise you just wind up with a bunch of nonsense, obtuse errors like: - "the input was wrong" - "gee, thanks, more details, please?" - sometimes you might be tempted to use NotFound, but this might be better suited. For instance, when you are dealing with a "foreign key" situation, and the foreign key is the input of the client. You'd want to be able to tell the user that their input was wrong because something was not found, not simply that it was not found.

    Therefore, specialize frantically.

  5. trait NotFound extends AnyRef

    Meaning:

    Meaning:

    "you cannot find something; it may or may not exist, and I'm not going to tell you anything else"

  6. trait Unauthorized extends AnyRef

    Meaning:

    Meaning:

    "something is wrong in the way you authorized, you can try again slightly differently"

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped