Class InvalidEmailException
Exception that is thrown by EPiServer when a non-fatal error occurs.
Implements
Inherited Members
Namespace: EPiServer.Core
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class InvalidEmailException : EPiServerException, ISerializable, _Exception
Remarks
All non-fatal exceptions in EPiServer is derived from this class.
If an exception occurs while translating a message the default message will be displayed instead, otherwise the actual cause of a exception could be hidden.
Examples
Example of throwing a exception with error message translated into different languages, see LocalizationService for more information about adding custom language resources.
throw new EPiServerException("My custom error","/customerror/genericfail");
Constructors
InvalidEmailException()
Initializes a new instance of the InvalidEmailException class.
Declaration
public InvalidEmailException()
InvalidEmailException(SerializationInfo, StreamingContext)
Initializes a new instance of the InvalidEmailException class.
Declaration
protected InvalidEmailException(SerializationInfo info, StreamingContext context)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | info | The object that holds the serialized object data. |
System.Runtime.Serialization.StreamingContext | context | The contextual information about the source or destination. |
InvalidEmailException(String)
Initializes a new instance with a specified error message.
Declaration
public InvalidEmailException(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | Error message |
InvalidEmailException(String, Exception)
Initializes a new instance with a specified error message and a reference to the inner exception that is the cause of this exception.
Declaration
public InvalidEmailException(string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | Error message |
System.Exception | innerException | The inner exception that is the cause of this exception |
InvalidEmailException(String, String)
Initializes a new instance with a specified error message and a language key passed to LocalizationService for translation.
Declaration
public InvalidEmailException(string message, string languageKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | Error message |
System.String | languageKey | Language key passed to LocalizationService for translation |
InvalidEmailException(String, String, Exception)
Initializes a new instance with a specified error message and a reference to the inner exception that is the cause of this exception. And a language key passed to LocalizationService for translation.
Declaration
public InvalidEmailException(string message, string languageKey, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | Error message |
System.String | languageKey | Language key passed to LocalizationService for translation |
System.Exception | innerException | The inner exception that is the cause of this exception |
InvalidEmailException(String, String, Exception, String[])
Initializes a new instance with a specified error message and a reference to the inner exception that is the cause of this exception. And a language key passed to LocalizationService for translation.
Declaration
public InvalidEmailException(string message, string languageKey, Exception innerException, params string[] list)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | Error message |
System.String | languageKey | Language key passed to LocalizationService for translation |
System.Exception | innerException | The inner exception that is the cause of this exception |
System.String[] | list | Parameter list to substitute values in error text using System.String.Format(System.String,System.Object[]) |
InvalidEmailException(String, String, String[])
Initializes a new instance with a specified error message and a language key passed to LocalizationService for translation.
Declaration
public InvalidEmailException(string message, string languageKey, params string[] list)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | Error message |
System.String | languageKey | Language key passed to LocalizationService for translation |
System.String[] | list | Parameter list to substitute values in error text using System.String.Format(System.String,System.Object[]) |