Android Don’t Catch Generic Exception

Sometimes it is tempting to be lazy when catching exceptions and do something like this: try { someComplicatedIOFunction(); // may throw IOException someComplicatedParsingFunction(); // may throw ParsingException someComplicatedSecurityFunction(); // may throw SecurityException // phew, made it all the way } catch (Exception e) { // I’ll just catch all exceptions handleError(); // with one generic

Read More