Updated examples with error ID
This commit is contained in:
parent
1906a24343
commit
eefd4ee615
3 changed files with 3 additions and 3 deletions
|
@ -20,7 +20,7 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation("net.thauvin.erik:cryptoprice:1.1.0-SNAPSHOT")
|
||||
implementation("net.thauvin.erik:cryptoprice:1.0.1-SNAPSHOT")
|
||||
implementation("org.json:json:20220924")
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ public class CryptoPriceSample {
|
|||
}
|
||||
} catch (CryptoException e) {
|
||||
System.err.println("HTTP Status Code: " + e.getStatusCode());
|
||||
System.err.println(e.getMessage());
|
||||
System.err.println(e.getMessage() + " (" + e.getId() + ')');
|
||||
} catch (IllegalArgumentException e) {
|
||||
System.err.println("Could not display the specified currency: " + args[1]);
|
||||
} catch (IOException e) {
|
||||
|
|
|
@ -40,7 +40,7 @@ fun main(args: Array<String>) {
|
|||
}
|
||||
} catch (e: CryptoException) {
|
||||
System.err.println("HTTP Status Code: ${e.statusCode}")
|
||||
System.err.println(e.message)
|
||||
System.err.println("${e.message} (${e.id})")
|
||||
} catch (e: IllegalArgumentException) {
|
||||
System.err.println("Could not display the specified currency: ${args[1]}")
|
||||
} catch (e: IOException) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue