Permalink
Browse files

Replace a possible Not_found exception with a descriptive exception.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
  • Loading branch information...
1 parent be796c8 commit d21b3d5ff6d51f3d42433e458622432288af70a7 David Scott committed Nov 30, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 ocaml/xapi/storage_mux.ml
@@ -44,6 +44,10 @@ let of_sr sr =
end else (Hashtbl.find plugins sr).processor
let domid_of_sr sr =
+ if not (Hashtbl.mem plugins sr) then begin
+ error "No storage plugin for SR: %s" sr;
+ raise (No_storage_plugin_for_sr sr)
+ end;
let uuid = (Hashtbl.find plugins sr).backend_domain in
try
Vmopshelpers.with_xc

0 comments on commit d21b3d5

Please sign in to comment.