dart_pkpass/lib/pkpass/error.dart
The one with the braid 6e7f19a764 feat: implement web service
Signed-off-by: The one with the braid <info@braid.business>
2023-11-26 19:42:29 +01:00

30 lines
754 B
Dart

abstract class PKPassError extends Error {
final String message;
PKPassError({required this.message});
@override
String toString() => 'PKPassError: $message';
}
class InvalidEncodingError extends PKPassError {
InvalidEncodingError() : super(message: 'Input not in ZIP format.');
}
class ManifestNotFoundError extends PKPassError {
ManifestNotFoundError()
: super(message: 'No manifest.json found in PKPass archive.');
}
class ManifestChecksumError extends PKPassError {
final String expected;
final String actual;
ManifestChecksumError({
required this.expected,
required this.actual,
}) : super(
message:
'Manifest sha1 checksum missmatch, expected $expected, actual $actual',
);
}