N2.Scene.get fail message
This commit is contained in:
parent
d5b7821ec7
commit
3714ecb88d
|
@ -267,5 +267,6 @@ module Scene = struct
|
||||||
raise (S2.Asset.Error (path, "parse error: " ^ msg))
|
raise (S2.Asset.Error (path, "parse error: " ^ msg))
|
||||||
|
|
||||||
let get t name =
|
let get t name =
|
||||||
Hashtbl.find t.objs name
|
try Hashtbl.find t.objs name
|
||||||
|
with Not_found -> Format.ksprintf failwith "no node %S in scene" name
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue