ForeignException (String message, Class<?> clazz) { String name = clazz.getName(); if (message.startsWith(name)) { int o = name.length(); if (message.startsWith(":", o)) o += 1; message = message.substring(o).trim(); } return new ForeignException(message, name); }