Yes. I will correct this. An error message needs to be presented to the user.
Thx for the catch!

From: Troy Ronda [mailto:notifications@github.com]
Sent: Monday, April 22, 2013 12:51 PM
To: securekey/openmidaas-android-app
Cc: Abhishek Das
Subject: Re: [openmidaas-android-app] Email registration. Please review (#2)


In app/src/org/openmidaas/app/common/UINotificationUtils.java:

> +

> +            // Set an EditText view to get user input

> +            final EditText input = new EditText(activity);

> +            alert.setView(input);

> +

> +            alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() {

> +            public void onClick(DialogInterface dialog, int whichButton) {

> +                    Editable value = input.getText();

> +                    try {

> +                            //GenericAttribute attribute = AttributeFactory.getGenericAttributeFactory().createAttribute(attributeName, value.toString());

> +                            GenericAttribute attribute = GenericAttributeFactory.createAttribute(attributeName);

> +                            attribute.setValue(value.toString());

> +                            attribute.save();

> +                            activity.sendBroadcast(new Intent().setAction(Intents.ATTRIBUTE_LIST_CHANGE_EVENT));

> +                    } catch (IllegalArgumentException e) {

> +                            // TODO Auto-generated catch block

remove TODO comments.

Are you catching all possible exceptions?

—
Reply to this email directly or view it on GitHub<https://github.com/securekey/openmidaas-android-app/pull/2/files#r3899360>.