Skip to content

Commit 6aae998

Browse files
committed
xenopsd/xc: Print all information in Service_failed exceptions
This means that now xensource.log will contain the reason that produced these exceptions Signed-off-by: Pau Ruiz Safont <pau.safont@citrix.com>
1 parent 11e422a commit 6aae998

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ocaml/xenopsd/xc/service.ml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ let defer f g = Xapi_stdext_pervasives.Pervasiveext.finally g f
2525

2626
exception Service_failed of (string * string)
2727

28+
let () =
29+
Printexc.register_printer (function
30+
| Service_failed (service, reason) ->
31+
Some
32+
(Printf.sprintf "Service_failed(service=%s,reason=%s)" service reason)
33+
| _ ->
34+
None
35+
)
36+
2837
type t = {
2938
name: string
3039
; domid: Xenctrl.domid

0 commit comments

Comments
 (0)