EwsThrowExceptions Property
Gets or sets whether the component will throw exceptions on errors.

Namespace: MailBee.EwsMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public bool ThrowExceptions { get; set; }

Property Value

Type: Boolean
A bool value indicating whether the component will throw exceptions on errors. The default value is true.
Remarks
When exceptions are disabled and an error occurs, the component methods return false (or a null reference (Nothing in Visual Basic) if the method normally returns an object). You can use LastResult, GetErrorDescription members to get more information about the error.
Note Note
Even if this property is set to false, the exceptions which occur due to errors in MailBee usage will still be thrown. Typical examples of such errors are: passing invalid arguments to methods, calling methods or settings properties in illegal state (for instance, an attempt to start an asynchronous method while another asynchronous method is not yet finished), etc. Such exceptions indicate programming errors in the application being developed, and thus cannot be suppressed.

ThrowExceptions property does not control whether to throw exceptions which occur due to logging errors (such as "log file cannot be written to", etc). To control whether logging exceptions should be thrown, the developer can use Log.DisableOnException property.

See Also