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

Namespace: MailBee.Pop3Mail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 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, GetServerResponse, GetSocketError 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 supressed.

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