Created
December 8, 2013 21:57
-
-
Save pbrewczynski/7864428 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private int getIntFromEditText (EditText et) throws Exception { | |
try { | |
return Integer.parseInt(et.getText().toString()); | |
} catch (NumberFormatException e) { | |
throw e; // because NumberFormatException describe my problem exactly | |
} catch (Exception e) { | |
throw e; // every other exception | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment