mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpiutil] Split DataLog background writer into different class (#6590)
DataLog is now a base class, with DataLogBackgroundWriter being the background thread version and DataLogWriter being a non-threaded version. Also split the C header into a separate file to make it more wpiformat friendly.
This commit is contained in:
@@ -21,12 +21,14 @@ static uint64_t mockNow = 0;
|
||||
static JException illegalArgEx;
|
||||
static JException indexOobEx;
|
||||
static JException interruptedEx;
|
||||
static JException ioEx;
|
||||
static JException nullPointerEx;
|
||||
|
||||
static const JExceptionInit exceptions[] = {
|
||||
{"java/lang/IllegalArgumentException", &illegalArgEx},
|
||||
{"java/lang/IndexOutOfBoundsException", &indexOobEx},
|
||||
{"java/lang/InterruptedException", &interruptedEx},
|
||||
{"java/io/IOException", &ioEx},
|
||||
{"java/lang/NullPointerException", &nullPointerEx}};
|
||||
|
||||
void wpi::ThrowIllegalArgumentException(JNIEnv* env, std::string_view msg) {
|
||||
@@ -37,6 +39,10 @@ void wpi::ThrowIndexOobException(JNIEnv* env, std::string_view msg) {
|
||||
indexOobEx.Throw(env, msg);
|
||||
}
|
||||
|
||||
void wpi::ThrowIOException(JNIEnv* env, std::string_view msg) {
|
||||
ioEx.Throw(env, msg);
|
||||
}
|
||||
|
||||
void wpi::ThrowNullPointerException(JNIEnv* env, std::string_view msg) {
|
||||
nullPointerEx.Throw(env, msg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user