ExceptUtilTryToGetT(FuncT, DictionaryString, FuncException, T, FuncException, T, Action) Method

Try-expression with dictionary and fallback resolver.

Definition

Namespace: Karamba.Utilities
Assembly: KarambaCommon (in KarambaCommon.dll) Version: 3.0.8.0+eb23a7103f0eca0b6d808121e15fec6899194e15
C#
public static T TryToGet<T>(
	Func<T> func,
	Dictionary<string, Func<Exception, T>> catcher,
	Func<Exception, T> fallback = null,
	Action final = null
)

Parameters

func  FuncT
normally lambda of expression.
catcher  DictionaryString, FuncException, T
dictionary with handler.
fallback  FuncException, T  (Optional)
fallback catch handler.
final  Action  (Optional)

[Missing <param name="final"/> documentation for "M:Karamba.Utilities.ExceptUtil.TryToGet``1(System.Func{``0},System.Collections.Generic.Dictionary{System.String,System.Func{System.Exception,``0}},System.Func{System.Exception,``0},System.Action)"]

Type Parameters

T
to transfer over return type.

Return Value

T
same as func.

See Also