Skip to content

Commit 8ec3928

Browse files
committed
improved Program.withExceptionHandler docs hinting at what the bool returned from the handler means
1 parent 3fa6bd9 commit 8ec3928

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/Fabulous/Program.fs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,14 @@ module Program =
109109
Init = traceInit
110110
Update = traceUpdate }
111111

112-
/// Configure how the unhandled exceptions happening during the execution of a Fabulous app with be handled
112+
/// <summary>
113+
/// Configures how unhandled exceptions happening in the MVU loop
114+
/// during the execution of a <paramref name="program" /> will be handled
115+
/// by setting its <see cref="Program.ExceptionHandler" />
116+
/// to the specified <paramref name="handler" />
117+
/// - which should return true if the exception was handled and the <paramref name="program" /> may continue
118+
/// and false otherwise, re-raising the error and terminating the <paramref name="program" />.
119+
/// </summary>
113120
let withExceptionHandler (handler: exn -> bool) (program: Program<'arg, 'model, 'msg>) =
114121
{ program with
115122
ExceptionHandler = handler }

0 commit comments

Comments
 (0)