Code example for InvalidParameterException

0
    	public static final String BUNDLE_TITLE = "title";
    	public static final String BUNDLE_BODY = "body";
 
    	public static ConfirmationDialogFragment newInstance(String title, String body, DialogCallback dialogCallback) {
        	if (title == null || body == null) {
        		throw new InvalidParameterException("Title and body cannot be null");
        	} 
            ConfirmationDialogFragment dialog = new ConfirmationDialogFragment();
            Bundle args = new Bundle();
            args.putString(BUNDLE_TITLE, title);
            args.putString(BUNDLE_BODY, body);
            dialog.setArguments(args);
            callback = dialogCallback;
            return dialog;
        } 
         
        @Override 
        public Dialog onCreateDialog(Bundle savedInstanceState) {
        	AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
        	//builder.setIcon(R.drawable.alert_dialog_icon) 
        	return builder.setTitle(getArguments().getString(BUNDLE_TITLE))