forked from saki4510t/UVCCamera
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06d5153
commit 53abc58
Showing
7 changed files
with
62 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import 'uvccamera_exception.dart'; | ||
|
||
/// Exception thrown when the [UvcCameraController] is disposed yet an operation is attempted. | ||
class UvcCameraControllerDisposedException extends UvcCameraException { | ||
const UvcCameraControllerDisposedException() : super('UvcCameraController is disposed'); | ||
} |
8 changes: 8 additions & 0 deletions
8
flutter/lib/src/uvccamera_controller_illegal_state_exception.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import 'uvccamera_exception.dart'; | ||
|
||
/// Exception thrown when the [UvcCameraController] is in an illegal state. | ||
class UvcCameraControllerIllegalStateException extends UvcCameraException { | ||
const UvcCameraControllerIllegalStateException([ | ||
super.message, | ||
]); | ||
} |
6 changes: 6 additions & 0 deletions
6
flutter/lib/src/uvccamera_controller_initialized_exception.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import 'uvccamera_exception.dart'; | ||
|
||
/// Exception thrown when the [UvcCameraController] is already initialized. | ||
class UvcCameraControllerInitializedException extends UvcCameraException { | ||
const UvcCameraControllerInitializedException() : super('UvcCameraController is already initialized'); | ||
} |
6 changes: 6 additions & 0 deletions
6
flutter/lib/src/uvccamera_controller_not_initialized_exception.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import 'uvccamera_exception.dart'; | ||
|
||
/// Exception thrown when the [UvcCameraController] is not initialized yet an operation is attempted. | ||
class UvcCameraControllerNotInitializedException extends UvcCameraException { | ||
const UvcCameraControllerNotInitializedException() : super('UvcCameraController is not initialized'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/// UVC Camera Exception | ||
class UvcCameraException implements Exception { | ||
final dynamic message; | ||
|
||
const UvcCameraException([this.message]); | ||
|
||
@override | ||
String toString() { | ||
if (message == null) return runtimeType.toString(); | ||
return "$runtimeType: $message"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters