Wrap a low-level cause when re-throwing
Wrap a low-level cause when re-throwing
Answer
try { loadEvents(file); } catch (IOException e) { throw new ControllerException("could not start", e); }
Passing `e` as the cause preserves the original stack trace; `getCause()` retrieves it and the trace shows it under `Caused by:`.