TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class TinmanException in Tinman.Core

This is the base exception class of the Tinman Library.

class TinmanException extends Exception
  base of ConfigException
  FailedAssertionException
  GeorefException
  InvalidArgumentException
  IOException
  PoolingException
  ValidatingException

Remarks

Subclasses of TinmanException are used to distinguish between error types that an application can respond to by catching specific exception types only. Low-level error information is provides using TinmanError objects. Subclasses can also provide error information on higher application levels.

When an instance of TinmanException (and not one of its subclasses) is thrown, this means that an unexpected and/or unrecoverable error has occurred. An application can use the error information to create a problem report. Theoretically, this can happen everywhere and at any time, so this kind of exception is never documented.

Public / Attributes

ErrorInfo

The TinmanError object that describes the error that has occurred.

public property ErrorInfo { get }
type TinmanError
value [not-null] The TinmanError object.

Message

[Pure]
public override sealed property Message { get }
type string
value
overrides Exception.Message

Source

The error source (see ErrorSource).

public property Source { get }
type string
value The error source tag.

Public / Constructors

BadPlatform

The underlying platform is not suitable for the code being executed.

public static method BadPlatform (string source)
type TinmanException
params source Error source tag.
returns The ready-to-throw exception.

CannotGrow

A capacity value was grown, but the resulting capacity is larger then 2147483647.

public static method CannotGrow (string source)
type TinmanException
params source The error source (see ErrorSource).
returns The ready-to-throw exception.

Error

An unexpected and unrecoverable error has occurred, which is usually bad.

public static method Error (string source, string message = null, TinmanError errorInfo = null)
type TinmanException
params source The error source (see ErrorSource).
  message The error message.
  errorInfo The error cause.
returns The ready-to-throw exception.

NativeError

A native function call has failed although it was expected to succeed.

public static method NativeError (string source, string functionName)
type TinmanException
params source The error source (see ErrorSource).
  functionName The function name.
returns The ready-to-throw exception.

Remarks:

The error code is retrieved via FetchLastError.


A native function call has failed although it was expected to succeed.

public static method NativeError (string source, string functionName, int32 errorCode)
type TinmanException
params source The error source (see ErrorSource).
  functionName The function name.
  errorCode The native error code.
returns The ready-to-throw exception.

A native function call has failed although it was expected to succeed.

public static method NativeError (string source, string functionName, string errorCode)
type TinmanException
params source The error source (see ErrorSource).
  functionName The function name.
  errorCode The native error code.
returns The ready-to-throw exception.

ShouldNeverHappen

This code path will never be executed; static code analysis may fail to detect this, but the developer (hopefully) knows better.

public static method ShouldNeverHappen (string source)
type TinmanException
params source The error source (see ErrorSource).
returns The ready-to-throw exception.

Remarks:

This factory method is only used to satisfy coding guidelines and to make the compiler happy.


This code path will never be executed; static code analysis may fail to detect this, but the developer (hopefully) knows better.

public static method ShouldNeverHappen (string source, TinmanException exception)
type TinmanException
params source The error source (see ErrorSource).
  exception The impossible exception that has been caught.
returns The ready-to-throw exception.

Remarks:

This factory method is only used to satisfy coding guidelines and to make the compiler happy.

UnknownEnum

An unknown enumeration value has been encountered.

public static method UnknownEnum (string source, string name, int32 ordinal)
type TinmanException
params source The error source (see ErrorSource).
  name Name of the enumeration.
  ordinal The ordinal number of the enumeration item.
returns The ready-to-throw exception.

An unknown enumeration value has been encountered.

public static method UnknownEnum (string source, string name, string ordinal)
type TinmanException
params source The error source (see ErrorSource).
  name Name of the enumeration.
  ordinal The ordinal number of the enumeration item.
returns The ready-to-throw exception.

Public / Methods

ToString

[Pure]
public override sealed method ToString ()
type string
overrides Exception.ToString

Protected / Attributes

NeedsStacktrace

Include a stack-trace in ErrorInfo?

protected virtual property NeedsStacktrace { get }
type bool
value true to include a stack-trace, false to omit it.

Protected / Constructors

TinmanException

Creates a new exception.

protected constructor TinmanException (string source, string message, TinmanError cause = null)
params source The error source (see ErrorSource).
  message The error message.
  cause Optional error cause. Defaults to null.

Protected / Methods

FetchLastError

Fetches the OS error code of the last operation.

protected static method FetchLastError ()
type int32
returns The OS error code.