mirror of
https://github.com/TimeCrafters/FTC_2022
synced 2025-12-15 20:12:35 +00:00
Make CyberarmEngine#setupFromConfig errors more useful, maybe.
This commit is contained in:
@@ -411,7 +411,7 @@ public abstract class CyberarmEngine extends OpMode {
|
|||||||
* state must have a construction that takes 3 arguments: object, groupName, and actionName
|
* state must have a construction that takes 3 arguments: object, groupName, and actionName
|
||||||
* @param configuration TimeCraftersConfiguration
|
* @param configuration TimeCraftersConfiguration
|
||||||
* @param packageName Package name where states are defined
|
* @param packageName Package name where states are defined
|
||||||
* @param object Object to pass to as first argument to states constructor
|
* @param object Object to pass as first argument to states constructor
|
||||||
* @param objectClass Class to cast object to
|
* @param objectClass Class to cast object to
|
||||||
* @param groupName Group name
|
* @param groupName Group name
|
||||||
*/
|
*/
|
||||||
@@ -456,7 +456,10 @@ public abstract class CyberarmEngine extends OpMode {
|
|||||||
} catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InstantiationException | InvocationTargetException e) {
|
} catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InstantiationException | InvocationTargetException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|
||||||
throw(new RuntimeException(e));
|
RuntimeException exception = new RuntimeException(e.getMessage(), e.getCause());
|
||||||
|
exception.setStackTrace(e.getStackTrace());
|
||||||
|
|
||||||
|
throw(exception);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user