Skip to content

Log the backtrace even when the exception is a Failure#1377

Merged
voodoos merged 2 commits intoocaml:masterfrom
antalsz:show-failure-backtrace
Nov 2, 2021
Merged

Log the backtrace even when the exception is a Failure#1377
voodoos merged 2 commits intoocaml:masterfrom
antalsz:show-failure-backtrace

Conversation

@antalsz
Copy link
Copy Markdown
Contributor

@antalsz antalsz commented Aug 6, 2021

In new_merlin.ml, there's code to log the backtraces of exceptions for all non-Failure exceptions; this PR reorganizes things so that the backtrace is logged regardless of the variety of exception we have.

Comment on lines 107 to 108
let trace = Printexc.get_backtrace () in
log ~title:"run" "Command error backtrace: %s" trace;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personal taste: I feel like the code would be easier to read by duplicating the printing command in the exception (Failure str) case instead of adding yet-another level of matching.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gone ahead and made that change

@voodoos voodoos merged commit 2760024 into ocaml:master Nov 2, 2021
voodoos added a commit that referenced this pull request Nov 22, 2021
* Show the backtrace even when the exception is a `Failure`
voodoos added a commit to voodoos/opam-repository that referenced this pull request Nov 23, 2021
CHANGES:

Mon Jul 26 11:12:21 PM CET 2021

  + merlin binary
    - Mbrowse.select_leaf: correctly ignore merlin.hide (ocaml/merlin#1376)
    - enable `occurences` to work when looking for locally abstract types
      (ocaml/merlin#1382)
    - handle `-alert` compiler flag (ocaml/merlin#1401)
    - avoid a race condition when the process started to read a configuration
      file crashes/is not found (ocaml/merlin#1378, @antalsz)
    - log the backtrace even when the exception is a Failure (ocaml/merlin#1377, @antalsz)
    - ignore `-error-style` compiler flag (ocaml/merlin#1402, @nojb)
    - fix handling of record field expressions (ocaml/merlin#1375)
    - allow -pp to return an AST (ocaml/merlin#1394)
    - fix merlin crashing due to short-paths (ocaml/merlin#1334, fixes ocaml/merlin#1322)
  + editor modes
    - update quick setup instructions for emacs (ocaml/merlin#1380, @ScriptDevil)
  + test suite
    - improve record field destruction testing (ocaml/merlin#1375)
voodoos added a commit to voodoos/opam-repository that referenced this pull request Nov 23, 2021
CHANGES:

Mon Jul 26 11:12:21 PM CET 2021

  + ocaml support
    - add support for 4.13
    - stopped actively supporting version older than 4.12
  + merlin binary
    - Mbrowse.select_leaf: correctly ignore merlin.hide (ocaml/merlin#1376)
    - enable `occurences` to work when looking for locally abstract types
      (ocaml/merlin#1382)
    - handle `-alert` compiler flag (ocaml/merlin#1401)
    - avoid a race condition when the process started to read a configuration
      file crashes/is not found (ocaml/merlin#1378, @antalsz)
    - log the backtrace even when the exception is a Failure (ocaml/merlin#1377, @antalsz)
    - ignore `-error-style` compiler flag (ocaml/merlin#1402, @nojb)
    - fix handling of record field expressions (ocaml/merlin#1375)
    - allow -pp to return an AST (ocaml/merlin#1394)
    - fix merlin crashing due to short-paths (ocaml/merlin#1334, fixes ocaml/merlin#1322)
  + editor modes
    - update quick setup instructions for emacs (ocaml/merlin#1380, @ScriptDevil)
  + test suite
    - improve record field destruction testing (ocaml/merlin#1375)
voodoos added a commit to voodoos/opam-repository that referenced this pull request Nov 23, 2021
CHANGES:

Mon Jul 26 11:12:21 PM CET 2021

  + merlin binary
    - Mbrowse.select_leaf: correctly ignore merlin.hide (ocaml/merlin#1376)
    - enable `occurences` to work when looking for locally abstract types
      (ocaml/merlin#1382)
    - handle `-alert` compiler flag (ocaml/merlin#1401)
    - avoid a race condition when the process started to read a configuration
      file crashes/is not found (ocaml/merlin#1378, @antalsz)
    - log the backtrace even when the exception is a Failure (ocaml/merlin#1377, @antalsz)
    - ignore `-error-style` compiler flag (ocaml/merlin#1402, @nojb)
    - fix handling of record field expressions (ocaml/merlin#1375)
    - allow -pp to return an AST (ocaml/merlin#1394)
    - fix merlin crashing due to short-paths (ocaml/merlin#1334, fixes ocaml/merlin#1322)
  + editor modes
    - update quick setup instructions for emacs (ocaml/merlin#1380, @ScriptDevil)
  + test suite
    - improve record field destruction testing (ocaml/merlin#1375)
voodoos added a commit to voodoos/opam-repository that referenced this pull request Nov 23, 2021
CHANGES:

Tue Nov 23 11:45:21 PM CET 2021

  + merlin binary
    - Mbrowse.select_leaf: correctly ignore merlin.hide (ocaml/merlin#1376)
    - make `occurences` work when looking for locally abstract types (ocaml/merlin#1382)
    - handle `-alert` compiler flag
    - improve destruct calls on record fields (ocaml/merlin#1375)
    - avoid a race condition when the process started to read a configuration
      file crashes/is not found (ocaml/merlin#1378, @antalsz)
    - log the backtrace even when the exception is a Failure (ocaml/merlin#1377, @antalsz)
    - allow -pp to return an AST (ocaml/merlin#1394)
    - ignore `-error-style` compiler flag (ocaml/merlin#1402, @nojb)
    - fix handling of record field expressions (ocaml/merlin#1375)
  + test suite
    - improve record field destruction testing (ocaml/merlin#1375)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants