Browse Source

[macro] make Context.getType return `null` for unknown types because that's how it's documented

Simon Krajewski 10 years ago
parent
commit
2dfa148e77
1 changed files with 1 additions and 1 deletions
  1. 1 1
      interp.ml

+ 1 - 1
interp.ml

@@ -2168,7 +2168,7 @@ let macro_lib =
 			match s with
 			| VString s ->
 				(match (get_ctx()).curapi.get_type s with
-				| None -> failwith ("Type not found '" ^ s ^ "'")
+				| None -> VNull
 				| Some t -> encode_type t)
 			| _ -> error()
 		);