rgrinberg / opium

Sinatra like web toolkit for OCaml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stacktrace in debugger middleware

aronerben opened this issue · comments

commented

Hello, currently the debugger middleware HTML response has two sections, Error and Request. What do you think of a new section Stacktrace/Backtrace? This would then print the backtrace provided by Printexc.get_backtrace ().

Some context:
When I'm building an application and I start out with a bunch of failwith "TODO" placeholders (or god forbid someone uses partial functions 😱 ), I at some point find myself looking for raised Errors a lot or writing an ad-hoc backtrace printer. I thought we could simply include it in Opium.

Let me know what you think! I'll gladly provide a PR if you deem it sensical :)