catch (Exception ex)
catch (JavaModelException ex)
    public void generate(IType type, Shell shell)    {        if (!validate(type, shell))        {            return;        }        ProgressMonitorDialog progressDialog = new ProgressMonitorDialog(shell);        progressDialog.open();        try        {            IProgressMonitor monitor = progressDialog.getProgressMonitor();            generateMethod(type, shell, monitor);        }        catch (Exception ex)        {            MessageDialog.openError(shell, CCMessages.getString("Generator.errortitle"), ex.getMessage()); //$NON-NLS-1$        }        progressDialog.close();    }