You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Lwt, exceptions are not recorded by the ocaml runtime, and so you don't get backtraces. However it is possible to get them when using the syntax extension. All you have to do is to pass the -lwt-debug switch to camlp4:
By default, the debug mode is enabled. This means that the backtrace versions of the bind, finalize and catch functions are used, enabling proper backtraces for the Lwt exceptions.
The debug mode can be disabled with the option -no-debug."
And yet I'm using lwt.ppx and get an exception, for reasons unknown, in my async_exception_hook of Unix.Unix_error(Unix.ENOTCONN, "shutdown", "") with no backtrace.
Also, docs have an example of write stdio "Hello, " >> write stdio "world!" but >> doesn't come up in ocp-browser or in Lwt.Infix.
I understand that documentation is hard, but some consistency in the docs would be nice.
And since the OCaml community tells everyone to "Don't write your own makefiles, use oasis", it would be nice to have build commands including all the esoteric flags expressed in oasis as well as command line usage.
(Yes, I understand the maintainers are probably overworked or don't necessarily care about what I need out of Lwt, so I'll be looking at fixing the documentation as well.)
The text was updated successfully, but these errors were encountered:
I'm having a hard time getting a backtrace from Lwt.
The main page of Lwt's documentation http://ocsigen.org/lwt/2.5.1/manual/manual has just this
"Backtrace support
When using Lwt, exceptions are not recorded by the ocaml runtime, and so you don't get backtraces. However it is possible to get them when using the syntax extension. All you have to do is to pass the -lwt-debug switch to camlp4:
$ ocamlfind ocamlc -syntax camlp4o -package lwt.syntax
-ppopt -lwt-debug -linkpkg -o foo foo.ml"
Okay, but I'm using PPX which is being pushed by the community and I'm using oasis which is also pushed heavily by the community.
which says:
"Debug
By default, the debug mode is enabled. This means that the backtrace versions of the bind, finalize and catch functions are used, enabling proper backtraces for the Lwt exceptions.
The debug mode can be disabled with the option -no-debug."
And yet I'm using lwt.ppx and get an exception, for reasons unknown, in my async_exception_hook of Unix.Unix_error(Unix.ENOTCONN, "shutdown", "") with no backtrace.
Also, docs have an example of write stdio "Hello, " >> write stdio "world!" but >> doesn't come up in ocp-browser or in Lwt.Infix.
I understand that documentation is hard, but some consistency in the docs would be nice.
And since the OCaml community tells everyone to "Don't write your own makefiles, use oasis", it would be nice to have build commands including all the esoteric flags expressed in oasis as well as command line usage.
(Yes, I understand the maintainers are probably overworked or don't necessarily care about what I need out of Lwt, so I'll be looking at fixing the documentation as well.)
The text was updated successfully, but these errors were encountered: