mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
java: Stop using the safe_malloc, etc. functions.
This commit is contained in:
@@ -31,7 +31,8 @@ include $(srcdir)/Makefile.inc
|
||||
java_sources = \
|
||||
$(java_built_sources) \
|
||||
com/redhat/et/libguestfs/EventCallback.java \
|
||||
com/redhat/et/libguestfs/LibGuestFSException.java
|
||||
com/redhat/et/libguestfs/LibGuestFSException.java \
|
||||
com/redhat/et/libguestfs/LibGuestFSOutOfMemory.java
|
||||
|
||||
java_tests = \
|
||||
Bindtests.java \
|
||||
|
||||
37
java/com/redhat/et/libguestfs/LibGuestFSOutOfMemory.java
Normal file
37
java/com/redhat/et/libguestfs/LibGuestFSOutOfMemory.java
Normal file
@@ -0,0 +1,37 @@
|
||||
/* libguestfs Java bindings
|
||||
* Copyright (C) 2009-2016 Red Hat Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
package com.redhat.et.libguestfs;
|
||||
|
||||
/**
|
||||
* Libguestfs out of memory class.
|
||||
* <p>
|
||||
* This exception is thrown when malloc or a similar call fails
|
||||
* in the bindings.
|
||||
*
|
||||
* @author rjones
|
||||
* @see Error
|
||||
*/
|
||||
public class LibGuestFSOutOfMemory extends Error {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public LibGuestFSOutOfMemory (String msg)
|
||||
{
|
||||
super (msg);
|
||||
}
|
||||
}
|
||||
@@ -38,6 +38,9 @@ is the error message (a C<String>).
|
||||
|
||||
Calling any method on a closed handle raises the same exception.
|
||||
|
||||
If L<malloc(3)> or some other allocation fails inside the bindings,
|
||||
the C<LibGuestFSOutOfMemory> exception is thrown.
|
||||
|
||||
=head2 EVENTS
|
||||
|
||||
The L<libguestfs event API|guestfs(3)/EVENTS> is fully supported from
|
||||
|
||||
Reference in New Issue
Block a user