if (lines < oldtrace.length) {
StackTraceElement[] newtrace = new StackTraceElement[lines];
System.arraycopy(oldtrace, 0, newtrace, 0, newtrace.length);
error.setStackTrace(newtrace);
}
LogManager.getLogger(Railcraft.MOD_ID).log(level, new MessageFormatMessage(msg, args), error);
}