mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Throw correct exception in HAL_getJoystickAxes/POVs JNI (#1336)
Was incorrectly not returning immediately after throwing the exception. Also add more detail to exception.
This commit is contained in:
committed by
Peter Johnson
parent
15c5a820bf
commit
32ec07ee01
@@ -11,6 +11,8 @@
|
||||
#include <jni.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <wpi/StringRef.h>
|
||||
|
||||
struct HAL_MatchInfo;
|
||||
|
||||
namespace frc {
|
||||
@@ -43,7 +45,7 @@ inline bool CheckCANStatus(JNIEnv* env, int32_t status, int32_t message_id) {
|
||||
return status == 0;
|
||||
}
|
||||
|
||||
void ThrowIllegalArgumentException(JNIEnv* env, const char* msg);
|
||||
void ThrowIllegalArgumentException(JNIEnv* env, wpi::StringRef msg);
|
||||
void ThrowBoundaryException(JNIEnv* env, double value, double lower,
|
||||
double upper);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user