VideoNormalizationException class sealed

The base of every error this package reports.

The hierarchy is sealed: a switch over an exception can be exhaustive. Each subclass has one stable code; the same codes are produced by the Android, iOS and web implementations.

try {
  await VideoNormalizer.instance.normalize(request);
} on NormalizationCancelled {
  // the user changed their mind
} on InsufficientStorage catch (e) {
  showMessage('Free up space and try again');
} on VideoNormalizationException catch (e) {
  report(e.code, e.message, e.details);
}
Implemented types
Annotations

Constructors

VideoNormalizationException.fromCode(String code, {String? message, String? platform, Map<String, Object?>? details, Object? cause})
Creates the exception that belongs to code.
factory

Properties

cause → Object?
The underlying error, when there is one.
final
code → String
A stable, machine-readable identifier such as invalid_input.
no setter
details → Map<String, Object?>?
Additional structured information, for example the native error code.
final
hashCode → int
The hash code for this object.
no setterinherited
message → String
A human-readable description in English.
final
platform → String?
android, ios, web, or dart for errors raised before the platform was involved. Null when unknown.
final
recoverable → bool
Whether trying again may succeed without changing the input or the configuration, for example after freeing storage.
no setter
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.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

allCodes → const List<String>
Every code a platform may report, in documentation order.