Minor exception handling refactoring
This commit is contained in:
1 parent
1f36fd0f32
commit
1f055d7eeb
2 files changed
+3
-5
No files matched your search
@@ -36,7 +36,7 @@ public class StreamUtils
|
|||||||
return out.toString();
|
return out.toString();
|
||||||
} catch (IOException ioe)
|
} catch (IOException ioe)
|
||||||
{
|
{
|
||||||
throw new RuntimeException("Error while reading response body", ioe);
|
throw new IllegalStateException("Error while reading response body", ioe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,8 +4,6 @@ import java.io.*;
|
|||||||
import java.net.*;
|
import java.net.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import org.scribe.exceptions.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utils to deal with URL and url-encodings
|
* Utils to deal with URL and url-encodings
|
||||||
*
|
*
|
||||||
@@ -78,7 +76,7 @@ public class URLUtils
|
|||||||
}
|
}
|
||||||
catch (UnsupportedEncodingException uee)
|
catch (UnsupportedEncodingException uee)
|
||||||
{
|
{
|
||||||
throw new OAuthException(ERROR_MSG, uee);
|
throw new IllegalStateException(ERROR_MSG, uee);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +95,7 @@ public class URLUtils
|
|||||||
}
|
}
|
||||||
catch (UnsupportedEncodingException uee)
|
catch (UnsupportedEncodingException uee)
|
||||||
{
|
{
|
||||||
throw new OAuthException(ERROR_MSG, uee);
|
throw new IllegalStateException(ERROR_MSG, uee);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user