question: public String checkException ( Exception ex ) { if ( ex instanceof JPlagException ) { JPlagException jex = ( JPlagException ) ex ; return "JPlagException: " + jex . getExceptionType ( ) + ": " + jex . getDescription ( ) + "<br />" + jex . getRepair ( ) ; } else if ( ex instanceof RemoteException ) { ex . printStackTrace ( ) ; return "RemoteException: " + ex . toString ( ) ; } else { ex . printStackTrace ( ) ; return "Unknown exception: " + ex . toString ( ) ; } }
target:  Converts an exception into a string depending on its type and logs a stack trace if it's not a JPlagException