static class Tinman.Core.System.ErrorBarrier<T>

The ErrorBarrier is a helper class that executes the specified method and catches all thrown exceptions, wrapping them in an TinmanError object.

Public / Methods


public static method Run → (3)

source in : string

The error source to use in case an exception is thrown.

method in : ErrorBarrierDelegate<T>

The delegate method.

argument opt : T = default(T)

Optional argument value.

returns → TinmanError

null if the called method returned without throwing an exception, the error message describing the thrown exception otherwise.

Invokes the given delegate method, catches any thrown exception and returns an TinmanError object that describes the thrown exception.