Skip to content

Commit f219fe1

Browse files
authored
debug traces for is_component_enabled (xapi-project#6280)
2 parents ec70db5 + ece03ca commit f219fe1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

ocaml/xapi/xapi_observer_components.ml

+10-2
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,17 @@ let is_component_enabled ~component =
9090
|> List.mem component
9191
)
9292
observers
93-
with _ -> false
93+
with e ->
94+
D.log_backtrace () ;
95+
D.warn "is_component_enabled(%s) inner got exception: %s"
96+
(to_string component) (Printexc.to_string e) ;
97+
false
9498
)
95-
with _ -> false
99+
with e ->
100+
D.log_backtrace () ;
101+
D.warn "is_component_enabled(%s) got exception: %s" (to_string component)
102+
(Printexc.to_string e) ;
103+
false
96104

97105
let is_smapi_enabled () = is_component_enabled ~component:SMApi
98106

0 commit comments

Comments
 (0)