DashboardException class
The base class for all exceptions thrown by the dashboard.
When handling errors, you can either catch
a specific class of errors or all errors at once.
If you know which error or exception to expect, that works, but catching all errors could
hide important ones that are meant to be fixed. This class defines the parent class of all
exceptions the dashboard would throw on its own, which means higher-level functions can use
this class to catch them and indicate an operation failed.
Exceptions are different than errors. An error indicates faulty code, while an exception means
the underlying cause can be addressed even if it requires human intervention. All error cases
that need to be caught and handled -- even if that means simply alerting the user -- should
therefore be exceptions. For more information, see Exception
vs Error
.
When creating your own exception, be sure to override toString
with a helpful message.
Constructors
- DashboardException()
-
Provides a const constructor.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited