Skip to content

T_CodeJam_CodeExceptions

Andrew Koryavchenko edited this page Jun 17, 2018 · 12 revisions

CodeExceptions Class

Exception factory class

Inheritance Hierarchy

System.Object
  CodeJam.CodeExceptions
Namespace: CodeJam
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public static class CodeExceptions

VB

<ExtensionAttribute>
Public NotInheritable Class CodeExceptions

F#

[<AbstractClassAttribute>]
[<SealedAttribute>]
[<ExtensionAttribute>]
type CodeExceptions =  class end

The CodeExceptions type exposes the following members.

Properties

 

Name Description
Public propertyStatic member BreakOnException If true, breaks execution if debugger is attached and assertion is failed. Enabled by default.
Public propertyStatic member CodeTraceSource Returns trace source for code exceptions.
  Back to Top

Methods

 

Name Description
Public methodStatic member Argument Creates ArgumentException.
Public methodStatic member ArgumentItemNull Creates ArgumentNullException.
Public methodStatic member ArgumentNull Creates ArgumentNullException.
Public methodStatic member ArgumentNullOrEmpty Creates ArgumentException for empty string.
Public methodStatic member ArgumentNullOrWhiteSpace Creates ArgumentException for empty (or whitespace) string.
Public methodStatic member ArgumentOutOfRange(String, Double, Double, Double) Creates ArgumentOutOfRangeException.
Public methodStatic member ArgumentOutOfRange(String, Int32, Int32, Int32) Creates ArgumentOutOfRangeException.
Public methodStatic member ArgumentOutOfRange(T)(String, T, T, T) Creates ArgumentOutOfRangeException.
Public methodStatic member BreakIfAttached BreaksExecution if debugger attached.
Public methodStatic member IndexOutOfRange Creates IndexOutOfRangeException.
Public methodStatic member InvalidOperation Creates InvalidOperationException.
Public methodStatic member ObjectDisposed(Type) Throw this if the object is disposed.
Public methodStatic member ObjectDisposed(Type, String, Object[]) Throw this if the object is disposed.
Public methodStatic member UnexpectedArgumentValue(T)(String, T) Creates ArgumentOutOfRangeException. Used to be thrown from the default: switch clause
Public methodStatic member UnexpectedArgumentValue(T)(String, T, String, Object[]) Creates ArgumentOutOfRangeException. Used to be thrown from default: switch clause
Public methodStatic member UnexpectedValue(String, Object[]) Creates InvalidOperationException. Used to be thrown from default: switch clause
Public methodStatic member UnexpectedValue(T)(T) Creates InvalidOperationException. Used to be thrown from the default: switch clause
Public methodStatic member Unreachable Used to be thrown in places expected to be unreachable.
  Back to Top

See Also

Reference

CodeJam Namespace

Clone this wiki locally