private static void EmitExceptionAsError(Action action) { try { action(); } catch (Exception exception) { EditorCompilationInterface.LogException(exception); } }
private static T EmitExceptionAsError <T>(Func <T> func, T returnValue) { T result; try { result = func(); } catch (Exception exception) { EditorCompilationInterface.LogException(exception); result = returnValue; } return(result); }