PatapataException class abstract
Defines exceptions that occur in applications using patapata.
If overridableLocalization is true, the localization keys localizedTitle,
localizedMessage, and localizedFix can be overridden by StandardPageWithResult.localizationKey.
The default is true.
Constructors
-
PatapataException({App<
Object> ? app, String? message, Object? original, List<String> ? fingerprint, Map<String, String> ? localeTitleData, Map<String, String> ? localeMessageData, Map<String, String> ? localeFixData, Future<void> fix()?, Level? logLevel, bool overridableLocalization = true, Level? userLogLevel})
Properties
- code → String
-
Error code.
Usually a string of prefix and internalCode.
no setter
- defaultPrefix → String
-
Default prefix when not set in ErrorEnvironment.errorReplacePrefixMap.
no setter
-
fingerprint
→ List<
String> ? -
Used to group and deduplicate events with the same fingerprint in the Log system.
final
-
fix
→ Future<
void> Function()? -
You can define a process to recover from the error.
final
- hasFix → bool
-
true if fix is defined.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasLocalizedFix → bool
-
true if the localization key for localizedFix is defined.
no setter
- hasLocalizedMessage → bool
-
true if the localization key for localizedMessage is defined.
no setter
- hasLocalizedTitle → bool
-
true if the localization key for localizedTitle is defined.
no setter
- hasOverrideLocalizedFix → bool
-
true if the localization key for localizedFix is overridden.
no setter
- hasOverrideLocalizedMessage → bool
-
true if the localization key for localizedMessage is overridden.
no setter
- hasOverrideLocalizedTitle → bool
-
true if the localization key for localizedTitle is overridden.
no setter
- internalCode → String
-
Internal error code.
Used as a localization key when being localized like in localizedMessage.
no setter
-
localeFixData
→ Map<
String, String> ? -
Parameters passed in the localization of localizedFix.
prefix is passed by default.
final
-
localeMessageData
→ Map<
String, String> ? -
Parameters passed in the localization of localizedMessage.
prefix is passed by default.
final
-
localeTitleData
→ Map<
String, String> ? -
Parameters passed in the localization of localizedTitle.
prefix is passed by default.
final
- localizedFix → String
-
Displays the error treatment message localized by the L10n system.
no setter
- localizedMessage → String
-
Displays the error message localized by the L10n system.
no setter
- localizedTitle → String
-
Displays the error title localized by the L10n system.
no setter
- logLevel → Level?
-
Notification
Levelto the Log system.final - message → String?
-
Error message.
This message is for logging and debugging purposes and is not meant to be displayed to the user.
final
- namespace → String
-
Defines the namespace of the error.
Used in localization keys like in localizedMessage and settings in ErrorEnvironment.
no setter
- original → Object?
-
Original error.
final
- prefix → String
-
Prefix for code
Can be set by ErrorEnvironment.errorReplacePrefixMap with namespace.
If not set, then defaultPrefix.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- userLogLevel → Level?
-
Importance from the user's perspective.
no setter
- widget → Widget
-
Returns ErrorWidget.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onReported(
ReportRecord record) → void - Called when this exception is reported by the Log system.
-
showDialog(
BuildContext context) → Future< void> - Displays a dialog.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited