cameraViewEx / com.priyankvasa.android.cameraviewex / CameraView / addCameraErrorListener

addCameraErrorListener

fun addCameraErrorListener(listener: (t: Throwable) -> Unit): CameraView

Add a new camera error listener. If no error listeners are added, then "critical" errors will be thrown to system exception handler (ie. hard crash) The only critical error thrown for now is for invalid aspect ratio.

Parameters

listener - lambda with t of type Throwable as argument

Return
instance of CameraView it is called on