# Errors

This article demonstrates how to customize the error content shown when one of the few known camera errors appear.

When one of the following errors appears, the camera buttons and player get replaced by an error message.

## Error Types

There are few expected errors that could appear using the control:

* CameraErrorState.**NoCamera**: This error appears when there is no camera device connected to the computer.

  ![WinForms RadWebCam NoCamera Error](https://www.telerik.com/products/winforms/documentation/assets/6af794e52e1d7e237160f0e35d80fdc9/webcam-errors001.png)

* CameraErrorState.**CameraIsBusy**: This error appears when another application is using the camera device.

  ![WinForms RadWebCam CameraIsBusy Error](https://www.telerik.com/products/winforms/documentation/assets/8e64dd4d0fbaf49c45dfda7104629d6e/webcam-errors002.png)

> caution **RadWebCam** can be used by a single application. Once a second application tries to access it, **CameraIsBusy** error will be shown.

* CameraErrorState.**CameraAccessDenied**: This error appears when the access to the camera is denied.

  ![WinForms RadWebCam AccessDenied Error](https://www.telerik.com/products/winforms/documentation/assets/430adee6eac5544eee96c942ff49a220/webcam-errors004.png)

## Replacing the Error Message

To replace the error message use the **CameraError** event of **RadWebCam**. The **CameraErrorEventArgs** give access to an **ErrorInfo** object, which contains information about the error state and message. Use the event to replace the default message with a custom one.

```C#
private void RadWebCam1_CameraError(object sender, CameraErrorEventArgs e)
{ 
    if (e.Error.ErrorState == CameraErrorState.NoCamera)
    {
        e.Error.Message = "Cannot detect a camera device.";
    }
}
```

```VB.NET
Private Sub RadWebCam1_CameraError(ByVal sender As Object, ByVal e As CameraErrorEventArgs)
    If e.[Error].ErrorState = CameraErrorState.NoCamera Then
        e.[Error].Message = "Cannot detect a camera device."
    End If
End Sub
```

![WinForms RadWebCam Replace Error Message](https://www.telerik.com/products/winforms/documentation/assets/b738a4c9f9da4743aa46a48c301cc3b0/webcam-errors003.png)

## See Also

* [Commands](https://www.telerik.com/products/winforms/documentation/controls/webcam/features/commands)
* [Snapshots](https://www.telerik.com/products/winforms/documentation/controls/webcam/features/snapshots)
* [Video Recording](https://www.telerik.com/products/winforms/documentation/controls/webcam/features/recording-video)
* [Media Information](https://www.telerik.com/products/winforms/documentation/controls/webcam/features/media-information)
* [Settings Dialog](https://www.telerik.com/products/winforms/documentation/controls/webcam/features/camera-settings-dialog)
