|
java-gnome version 4.0.15 | ||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||
ObjectThrowable
Exception
org.gnome.glib.GlibException
public class GlibException
An exception thrown by the underlying library.
It is inappropriate for a public API wrapper method to throw this Exception. It is to be caught and re-thrown as a new Exception of an appropriate Java type. For example, if a function uses this mechanism to report being unable to locate a file on disk, then the wrapper method should do the following:
public String getModificationDate(String filename) {
try {
NativeLibrary.getModificationDate(this, filename);
} catch (GlibException ge) {
throw new FileNotFoundException(ge.getMessage());
}
}
We map native functions that take a GError** argument to
throwing this Exception if the function actually returns an error via that
parameter; the error parameter is masked from the binding hacker's view by
being handled in the C side JNI code.
Note that GErrors are meant as Exceptions in the Java sense
of the term; they do not represent crashes nor RuntimeExceptions; they are
conditions that the programmer will need to create appropriate user
interface code for to allow the user to deal with.
| Method Summary |
|---|
| Methods inherited from class Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
|
![]() java-gnome |
||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||