diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-11-17 21:17:44 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-11-17 21:28:43 +0000 |
commit | 4ba8b5a00d7336e87e15a854b0534c630f456f7c (patch) | |
tree | 3cab9dc103d887dd00f314435521969703af5be9 /lua/examples | |
parent | a9c4efdcfd213202c9c9b478e92fe908a700b957 (diff) | |
download | libguestfs-4ba8b5a00d7336e87e15a854b0534c630f456f7c.tar.gz libguestfs-4ba8b5a00d7336e87e15a854b0534c630f456f7c.tar.xz libguestfs-4ba8b5a00d7336e87e15a854b0534c630f456f7c.zip |
lua: Add some missing features.
- Remove default error handler.
- User cancel.
- Add the errno to the object which is thrown on error.
Still no events.
Diffstat (limited to 'lua/examples')
-rw-r--r-- | lua/examples/guestfs-lua.pod | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lua/examples/guestfs-lua.pod b/lua/examples/guestfs-lua.pod index 33c9b811..b7d167c9 100644 --- a/lua/examples/guestfs-lua.pod +++ b/lua/examples/guestfs-lua.pod @@ -65,7 +65,23 @@ properly. We hope to come up with a better solution later. =head2 ERRORS -Errors are converted into exceptions. Use C<pcall> to catch these. +Most (but not all) errors are converted into objects (ie. tables) +containing the following fields: + +=over 4 + +=item msg + +The error message (corresponding to L<guestfs(3)/guestfs_last_error>). + +=item code + +The C<errno> (corresponding to L<guestfs(3)/guestfs_last_errno>). + +=back + +Note that some errors can also be thrown as plain strings. You +need to check the type. =head1 EXAMPLE 1: CREATE A DISK IMAGE |