New to Telerik UI for WinForms? Start a free 30-day trial

Controls how errors raised by taskbar helpers are reported and whether they are thrown.

Definition

Namespace:Telerik.WinControls.Taskbar

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class ErrorManager

Inheritance: objectErrorManager

Constructors

Creates an error manager that throws reported errors unless OnError(Exception) suppresses them.

C#
public ErrorManager()

Properties

Gets or replaces the error manager used by taskbar helpers. Reading the property creates a default instance when none is set.

C#
public static ErrorManager Instance { get; set; }

Gets or sets whether reported errors invoke OnError(Exception) and are thrown when that method returns true. When false, errors are neither passed to OnError(Exception) nor thrown.

C#
public bool ThrowExceptionOnError { get; set; }

Methods

Reports an invalid argument by creating an ArgumentException.

C#
public virtual void ArgumentError(string message, string paramName)
Parameters:messagestring

The explanation for the invalid argument.

paramNamestring

The name of the argument that caused the error.

Reports a null or otherwise invalid required value by creating an ArgumentNullException with the specified message.

C#
public virtual void ArgumentNullError(string paramName, string message)
Parameters:paramNamestring

The name of the argument whose value is null or invalid.

messagestring

The explanation for the invalid value.

Reports a null or otherwise invalid required value by creating an ArgumentNullException for that parameter.

C#
public virtual void ArgumentNullError(string paramName)
Parameters:paramNamestring

The name of the argument whose value is null or invalid.

Reports the supplied exception through the configured error-handling policy.

C#
public virtual void Error(Exception exception)
Parameters:exceptionException

The exception to report.

Reports a shell failure by creating an ExternalException with the supplied error code.

C#
public virtual void ExternalError(int errorCode)
Parameters:errorCodeint

The error code associated with the shell failure.

Reports an external failure by creating an ExternalException with the specified message and inner exception.

C#
public virtual void ExternalError(string message, Exception inner)
Parameters:messagestring

The message describing the external failure.

innerException

The exception that caused the external failure.

Reports an external failure by creating an ExternalException with the specified message and error code.

C#
public virtual void ExternalError(string message, int errorCode)
Parameters:messagestring

The message describing the external failure.

errorCodeint

The error code associated with the failure.

Reports a missing file by creating a FileNotFoundException whose message includes the supplied path.

C#
public virtual void FileNotFoundError(string path)
Parameters:pathstring

The path that could not be found.

Reports that the required Windows taskbar features are unavailable by creating a PlatformNotSupportedException.

C#
public virtual void NotSupportedWindowsError()

Notifies that an exception is about to be thrown. This method allows to handle each exception separately and/or log them. Note that if ThrowExceptionOnError is set to false this method will not be fired.

C#
protected virtual bool OnError(Exception ex)
Parameters:exException

The exception.

Returns:

bool

A value indicating whether to throw the exception. Default value is true.