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
- Alphabetic
- By Inheritance
- MeaningfulAnomalies
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
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.
-
trait
Denied extends AnyRef
Meaning:
Meaning:
"you know it exists, but you are not allowed to see it"
-
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".
-
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.
-
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"
-
trait
Unauthorized extends AnyRef
Meaning:
Meaning:
"something is wrong in the way you authorized, you can try again slightly differently"
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()