handleException static method
Implementation
static Exception handleException(Object e) {
if (e is SocketException) {
throw NoInternetConnectionException();
} else if (e is FormatException) {
throw BadResponseFormatException();
} else if (e is HttpException) {
throw HttpException(e.message);
} else {
throw SomethingWentWrongException();
}
}