error printing fixup
This commit is contained in:
parent
1df5e2c6d8
commit
4983226b4a
|
@ -9,10 +9,9 @@ let main () =
|
|||
let tg = TG.make () in
|
||||
let sg = SG.make () in
|
||||
|
||||
let sq = aabb (-50.0) (-50.0) 50.0 50.0 in
|
||||
|
||||
let t_a = TG.add tg in
|
||||
|
||||
let sq = aabb (-50.0) (-50.0) 50.0 50.0 in
|
||||
let t_b = TG.add tg ~parent:t_a in
|
||||
SG.add sg ~tf:(TG.world t_b)
|
||||
~bb:sq
|
||||
|
@ -32,6 +31,7 @@ let main () =
|
|||
info (fun m -> m "window initialized");
|
||||
let ren = Renderer.make ~window in
|
||||
info (fun m -> m "renderer initialized");
|
||||
|
||||
let render () =
|
||||
begin
|
||||
(* Update *)
|
||||
|
@ -66,7 +66,8 @@ let () =
|
|||
Ohlog.init () ~min_level:DEBUG;
|
||||
|
||||
try main () with
|
||||
| Failure msg -> error (fun m -> m "%s" msg)
|
||||
| Sdl.Error msg -> error (fun m -> m "SDL error: %s" msg)
|
||||
| Gl.Error (why, msg) -> error (fun m -> m "OpenGL error (%s): %s" why msg)
|
||||
| Asset.Error (path, msg) -> error (fun m -> m "failed to load %S: %s" path msg)
|
||||
| Failure msg -> error (fun m -> m "Fatal: %s" msg)
|
||||
| exn -> error (fun m -> m "Uncaught: %s" (Printexc.to_string exn))
|
||||
|
|
Loading…
Reference in New Issue