示例#1
0
 private static void EmitExceptionAsError(Action action)
 {
     try
     {
         action();
     }
     catch (Exception exception)
     {
         EditorCompilationInterface.LogException(exception);
     }
 }
示例#2
0
        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);
        }