ErrorBarrier

Description

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

Run


public static method Run → (3)

source in : string

[not-empty]
The error source to use in case an exception is thrown.

method in : ErrorBarrierDelegate<T>

[not-null]
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.