Skip to content

Commit

Permalink
Add some pointers to the backtrace section of the manual;
Browse files Browse the repository at this point in the history
  • Loading branch information
Drup committed Jan 18, 2016
1 parent 5a02701 commit 195a53e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/core/lwt.mli
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ val bind : 'a t -> ('a -> 'b t) -> 'b t
Note that [bind] is also often used just for synchronization
purpose: [t'] will not execute before [t] is terminated.
The result of a thread can be bound several times. *)
The result of a thread can be bound several times.
Note that [bind] will not propagate backtraces correctly.
See <<a_api project="lwt" | The manual>>
for how to enable backtraces.
*)

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
(** [t >>= f] is an alternative notation for [bind t f]. *)
Expand Down Expand Up @@ -253,7 +258,11 @@ val async_exception_hook : (exn -> unit) ref
backtrace if available and to exit the program.
The behavior is undefined if this function raise an
exception. *)
exception.
See <<a_api project="lwt" | The manual>>
for how to enable backtraces.
*)

This comment has been minimized.

Copy link
@aantron

aantron Jan 18, 2016

Collaborator

This does make it much easier to get from module Lwt to the backtrace documentation, but I still recommend adding a note to Lwt.async_exception_hook as well. It will make life easier for people whose first encounter with a strange Lwt backtrace is through Lwt.async.


(** {2 Sleeping and resuming} *)

Expand Down

0 comments on commit 195a53e

Please sign in to comment.