public ScannerException(File file,ErrorMessages message,int line){
  this(file,ErrorMessages.get(message),message,line,-1);
}

public ScannerException ( File file , ErrorMessages message , int line ) { this ( file , ErrorMessages . get ( message ) , message , line , - 1 ) ; }
creates a new scannerexception for a file with a message and line number .
