Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Navaron Bracke
2022-11-19 18:28:14 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
38b3d5c353d8fc49ecb7b752b23e456b9aa1e016
38b3d5c3
1 parent
9f09c331
add error details to mobile scanner error
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletions
lib/src/mobile_scanner_exception.dart
lib/src/mobile_scanner_exception.dart
View file @
38b3d5c
...
...
@@ -2,8 +2,32 @@ import 'package:mobile_scanner/src/enums/mobile_scanner_error_code.dart';
/// This class represents an exception throzn by the mobile scanner.
class
MobileScannerException
implements
Exception
{
MobileScannerException
({
required
this
.
errorCode
});
const
MobileScannerException
({
required
this
.
errorCode
,
this
.
errorDetails
,
});
/// The error code of the exception.
final
MobileScannerErrorCode
errorCode
;
/// The additional error details that came with the [errorCode].
final
MobileScannerErrorDetails
?
errorDetails
;
}
/// The raw error details for a [MobileScannerException].
class
MobileScannerErrorDetails
{
const
MobileScannerErrorDetails
({
this
.
code
,
this
.
details
,
this
.
message
,
});
/// The error code from the [PlatformException].
final
String
?
code
;
/// The details from the [PlatformException].
final
Object
?
details
;
/// The error message from the [PlatformException].
final
String
?
message
;
}
...
...
Please
register
or
login
to post a comment