Created
May 9, 2012 13:31
-
-
Save Lokutus/2644512 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum ErrorCodes | |
{ | |
NotNumeric, | |
BadFormat, | |
ChecksumError | |
} | |
public class BarCodeException : ArgumentException | |
{ | |
public ErrorCodes ErrorCode { get; private set; } | |
public BarCodeException() | |
: base() { } | |
public BarCodeException(string message) | |
: base(message) { } | |
public BarCodeException(string format, params object[] args) | |
: base(string.Format(format, args)) { } | |
public BarCodeException(string message, Exception innerException) | |
: base(message, innerException) { } | |
public BarCodeException(string format, Exception innerException, params object[] args) | |
: base(string.Format(format, args), innerException) { } | |
protected BarCodeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) | |
: base(info, context) { } | |
public BarCodeException(ErrorCodes errorCode) | |
: base() | |
{ | |
ErrorCode = errorCode; | |
} | |
public BarCodeException(string message, ErrorCodes errorCode) | |
: base(message) | |
{ | |
ErrorCode = errorCode; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment