Func<You>

Software Development Fun

Exception(al) Fun

// Auto generate exceptions if only message public static void AddErrorToLog(string errorMessage) { try { throw new Exception(errorMessage); } catch (Exception ex) { AddErrorToLog(ex); } } public static void AddErrorToLog(Exception ex) { try { LogClient.AddErrorToLogAsync(ex); } catch (Exception localEx) { _logger.Error("Client Error", localEx); _logger.Error("Client Error - Original Exception", ex); } }

Mind… BLOWN!

]]>


Categorised as: Clueless, Development


Comments are closed.