mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-08-03 19:17:27 -04:00
preserve original exception thrown for machine arch ctors
to not "eat" the original exception, we can just set it in the IllegalArgumentException's cause, see https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#getCause() closes: #2146
This commit is contained in:
parent
fd5fd98c84
commit
0123dce575
@ -1027,7 +1027,7 @@ object Machine extends MachineAPI {
|
||||
architecture.getConstructor(classOf[machine.Machine])
|
||||
}
|
||||
catch {
|
||||
case t: Throwable => throw new IllegalArgumentException("Architecture does not have required constructor.")
|
||||
case t: Throwable => throw new IllegalArgumentException("Architecture does not have required constructor.", t)
|
||||
}
|
||||
checked += architecture
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user