Class SoDuplicateException
Exception thrown when a duplicate entity has been encountered where one is not allowed. e.g. when a new list item is created with an existing name.
Implements
Inherited Members
Namespace: SuperOfficeExceptions
Assembly: SoCore.dll
Syntax
public class SoDuplicateException : SoException, ISerializable
Remarks
Will be logged as Trace, not as Exception. Override this default behaviour by providing a value for the logAsException parameter.
Constructors
SoDuplicateException(string, bool)
Will be logged as Trace, not as Exception. Override this default behaviour by providing a value for the logAsException parameter.
Declaration
public SoDuplicateException(string message, bool logAsException = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Error message. |
| bool | logAsException | Default false: will log as Trace. Set to true to log as Exception. |
SoDuplicateException(string, Exception, bool?)
Will be logged as Trace, not as Exception. Override this default behaviour by providing a value for the logAsException parameter.
Declaration
public SoDuplicateException(string message, Exception innerException, bool? logAsException = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Error message. |
| Exception | innerException | Inner exception. |
| bool | logAsException | Default false: will log as Trace. Set to true to log as Exception. Set to null to let the inner exceptions LogAsException value rule. |
SoDuplicateException(string, Exception, string, bool?)
Will be logged as Trace, not as Exception. Override this default behaviour by providing a value for the logAsException parameter.
Declaration
public SoDuplicateException(string message, Exception innerException, string friendlyText, bool? logAsException = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | Error message. |
| Exception | innerException | Inner exception. |
| string | friendlyText | For web to fetch the exception and show nice error dialogs. |
| bool | logAsException | Default false: will log as Trace. Set to true to log as Exception. Set to null to let the inner exceptions LogAsException value rule. |