let auto_debug f =
  try f ()
  with exc -> debug (Printexc.to_string exc) ; raise exc