introduce new camera exceptions

pull/59/merge^2
Tim H 8 years ago
parent 48fb88ae0a
commit 758f815aa1
  1. 16
      cameraview/src/main/java/com/otaliastudios/cameraview/CameraConfigurationFailedException.java
  2. 17
      cameraview/src/main/java/com/otaliastudios/cameraview/CameraUnavailableException.java
  3. 15
      cameraview/src/main/java/com/otaliastudios/cameraview/CapturingFailedException.java
  4. 17
      cameraview/src/main/java/com/otaliastudios/cameraview/CapturingImageFailedException.java
  5. 17
      cameraview/src/main/java/com/otaliastudios/cameraview/CapturingPictureFailedException.java
  6. 17
      cameraview/src/main/java/com/otaliastudios/cameraview/CapturingSnapshotFailedException.java
  7. 16
      cameraview/src/main/java/com/otaliastudios/cameraview/CapturingVideoFailedException.java

@ -0,0 +1,16 @@
package com.otaliastudios.cameraview;
/**
* An object of this class describes an error that occurred during the normal runtime of the camera.
* The previously started setting change failed, but the camera should be still available.
*/
public class CameraConfigurationFailedException extends CameraException {
CameraConfigurationFailedException(String message) {
super(message);
}
CameraConfigurationFailedException(String message, Throwable cause) {
super(message, cause);
}
}

@ -0,0 +1,17 @@
package com.otaliastudios.cameraview;
/**
* An object of this class describes an error that occurred during the normal runtime of the camera.
* It prevents the camera from being used. The cause may be temporary or permanent. You should
* restart the camera or deactivate any user interaction with the camera.
*/
public class CameraUnavailableException extends CameraException {
CameraUnavailableException(String message) {
super(message);
}
CameraUnavailableException(String message, Throwable cause) {
super(message, cause);
}
}

@ -0,0 +1,15 @@
package com.otaliastudios.cameraview;
/**
* An object of this class describes an error that occurred during the normal runtime of the camera.
* The previously started capturing failed, but the camera should be still available.
*/
public abstract class CapturingFailedException extends CameraException {
CapturingFailedException(String message) {
super(message);
}
CapturingFailedException(String message, Throwable cause) {
super(message, cause);
}
}

@ -0,0 +1,17 @@
package com.otaliastudios.cameraview;
/**
* An object of this class describes an error that occurred during the normal runtime of the camera.
* The previously started image capturing failed (snapshot or "real picture"), but the camera should
* be still available.
*/
public abstract class CapturingImageFailedException extends CapturingFailedException {
CapturingImageFailedException(String message) {
super(message);
}
CapturingImageFailedException(String message, Throwable cause) {
super(message, cause);
}
}

@ -0,0 +1,17 @@
package com.otaliastudios.cameraview;
/**
* An object of this class describes an error that occurred during the normal runtime of the camera.
* The previously started picture capturing failed, but the camera should be still available.
* This exception does not handle failed snapshots.
*/
public class CapturingPictureFailedException extends CapturingImageFailedException {
CapturingPictureFailedException(String message) {
super(message);
}
CapturingPictureFailedException(String message, Throwable cause) {
super(message, cause);
}
}

@ -0,0 +1,17 @@
package com.otaliastudios.cameraview;
/**
* An object of this class describes an error that occurred during the normal runtime of the camera.
* The previously started snapshot capturing failed, but the camera should be still available.
* This exception does not handle failed "real picture" capturing.
*/
public class CapturingSnapshotFailedException extends CapturingImageFailedException {
CapturingSnapshotFailedException(String message) {
super(message);
}
CapturingSnapshotFailedException(String message, Throwable cause) {
super(message, cause);
}
}

@ -0,0 +1,16 @@
package com.otaliastudios.cameraview;
/**
* An object of this class describes an error that occurred during the normal runtime of the camera.
* The previously started video capturing failed, but the camera should be still available.
*/
public class CapturingVideoFailedException extends CapturingFailedException {
CapturingVideoFailedException(String message) {
super(message);
}
CapturingVideoFailedException(String message, Throwable cause) {
super(message, cause);
}
}
Loading…
Cancel
Save