Exemplo n.º 1
0
 internal static void Try(InternalExceptionCode rethrowCode, Action action) => Try(() => Rethrow(rethrowCode, action));
Exemplo n.º 2
0
 internal static T Try <T>(InternalExceptionCode rethrowCode, Func <T> action) => Try(() => Rethrow(rethrowCode, action));
Exemplo n.º 3
0
 internal static void Rethrow(InternalExceptionCode errorCode, Action action) => Rethrow(errorCode, () =>
 {
     action();
     return(0);
 });
Exemplo n.º 4
0
 internal static T Rethrow <T>(InternalExceptionCode errorCode, Func <T> action)
 {
     try { return(action()); }
     catch (Exception exception) { throw new InternalException(errorCode, exception); }
 }
Exemplo n.º 5
0
 internal void Throw(InternalExceptionCode errorCode) => this.Run(() => throw new InternalException(errorCode));