[infer][ondemand] assert that the callbacks are set before retrieving the procedure description

Summary: This is make the callbacks are always set instead of silently returning `None`

Reviewed By: ngorogiannis

Differential Revision: D8651971

fbshipit-source-id: 7cd1c02
master
Jeremy Dubreil 7 years ago committed by Facebook Github Bot
parent 8f5504fe28
commit a055833eb3

@ -240,4 +240,5 @@ let clear_cache () = Typ.Procname.Hash.clear (Lazy.force cached_results)
(** Find a proc desc for the procedure, perhaps loading it from disk. *)
let get_proc_desc callee_pname =
match !callbacks_ref with Some callbacks -> callbacks.get_proc_desc callee_pname | None -> None
let callbacks = Option.value_exn !callbacks_ref in
callbacks.get_proc_desc callee_pname

Loading…
Cancel
Save