Java-Runtime-Compiler
Java-Runtime-Compiler copied to clipboard
Report compilation errors in exception
This pull request is based on #141 for simplicity; but if you want I can try to base it on the ea branch instead.
Relates to #35
Currently when you call CachedCompiler#loadFromJava with code containing compilation errors, you just get a ClassNotFoundException without any details. And depending on whether you used a custom PrinterWriter you then either have to inspect its output or System.err console output to understand the actual case.
This can be rather confusing and makes troubleshooting more difficult.
This pull request here collects Error diagnostics and in case of a ClassNotFoundException includes those in the exception message.