Enhance the Augeas.Error exception
authorPino Toscano <ptoscano@redhat.com>
Wed, 13 Sep 2017 16:25:01 +0000 (18:25 +0200)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 13 Sep 2017 16:56:43 +0000 (17:56 +0100)
commitf7638380d5d7b67773ae149c4d3206a716dc9a13
tree59e9f46add82e3b1cc30b2526f9e78d31acaf437
parent62f4b1532b3b55da5b46043da9d44138ce5e48c4
Enhance the Augeas.Error exception

Augeas.Error is very limited, and only provides an error string provided
by ocaml-augeas itself: this makes it hard to actually understand what
is an Augeas.Error that was raised, and eventually perform different
actions based on that.

To overcome that, Augeas.Error is changed to be a tuple containing the
error code (as reported by Augeas), still the ocaml-augeas error string,
and error message and details of the Augeas error -- all the
informations that Augeas provides.
This breaks API compatibility with current users, but unfortunately
there is no way around that.
augeas-c.c
augeas.ml
augeas.mli