Skip to content

Commit 17cc247

Browse files
committed
Fix wrong exception type used in native code.
1 parent edd78e2 commit 17cc247

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/main/cpp/windows/jssc.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ JNIEXPORT jint JNICALL Java_jssc_SerialNativeInterface_writeBytes
293293
if( err ){
294294
char emsg[128];
295295
snprintf(emsg, sizeof emsg, "Error %lu: https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes#system-error-codes", (long unsigned)err);
296-
jclass exClz = env->FindClass("jssc/SerialPortException");
296+
jclass exClz = env->FindClass("java/io/IOException");
297297
if( exClz ) env->ThrowNew(exClz, emsg);
298298
}
299299
return returnValue;

0 commit comments

Comments
 (0)