Add exception trowing in case
peer object is not existing. (Stream closed, not created, etc)


git-svn-id: svn://10.0.0.236/trunk@55107 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
idk%eng.sun.com
1999-12-02 23:20:29 +00:00
parent 2f528b1160
commit 89d1c55bef

View File

@@ -67,6 +67,14 @@ JNIEXPORT jint JNICALL Java_org_mozilla_pluglet_mozilla_PlugletInputStream_nativ
if (env->ExceptionOccurred()) {
return retval;
}
if (!input) {
jclass ex = env->FindClass("java/io/IOException");
if (!ex) {
return retval;
}
env->ThrowNew(ex,"Stream was closed");
return retval;
}
jbyte * bufElems = (jbyte*) malloc(sizeof(jbyte)*len);
if (!bufElems) {
return retval;