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.
Namespace: SuperOffice.Exceptions
Assembly: SoCore.dll
Syntax
public class SoDuplicateException : SoException
Remarks
Will be logged as Trace, not as Exception. Override this default behaviour by providing a value for the logAsException parameter.
Constructors
SoDuplicateException(String, Boolean)
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 |
---|---|---|
System.String | message | Error message. |
System.Boolean | logAsException | Default false: will log as Trace. Set to true to log as Exception. |
SoDuplicateException(String, Exception, Nullable<Boolean>)
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, Nullable<bool> logAsException)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | Error message. |
System.Exception | innerException | Inner exception. |
System.Nullable<System.Boolean> | 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, Nullable<Boolean>)
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, Nullable<bool> logAsException)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | Error message. |
System.Exception | innerException | Inner exception. |
System.String | friendlyText | For web to fetch the exception and show nice error dialogs. |
System.Nullable<System.Boolean> | 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. |