public void Process() { try { ProcessImpl(); } catch (InstructionWeavingException ex) { throw new WeavingException(_log.QualifyMessage(ex.Message, ex.Instruction)) { SequencePoint = _sequencePoints.GetInputSequencePoint(ex.Instruction) }; } catch (WeavingException ex) { throw new WeavingException(_log.QualifyMessage(ex.Message)) { SequencePoint = ex.SequencePoint }; } catch (Exception ex) { throw new InvalidOperationException($"Unexpected error occured while processing method {_method.FullName}: {ex.Message}", ex); } }
public void Process() { try { ProcessImpl(); } catch (InstructionWeavingException ex) { var message = ex.Message.Contains(_method.FullName) ? ex.Message : ex.Instruction != null ? $"{ex.Message} (in {_method.FullName} at instruction {ex.Instruction})" : $"{ex.Message} (in {_method.FullName})"; throw new WeavingException(message) { SequencePoint = _sequencePoints.GetInputSequencePoint(ex.Instruction) }; } catch (WeavingException ex) { throw new WeavingException($"{ex.Message} (in {_method.FullName})") { SequencePoint = ex.SequencePoint }; } catch (Exception ex) { throw new InvalidOperationException($"Unexpected error occured while processing method {_method.FullName}: {ex.Message}", ex); } }