test

Java code posted by tet
created at 25 Sep 09:05

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// smoopeClient initialized somewhere

try {
    Business business == smoopeClient.getBusiness();
} catch (ResponseException e) {
    // Handle error
} catch (BadRequestException e) {
    // Handle error
} catch (UnauthorizedException e) {
    // Handle error
} catch (ForbiddenException e) {
    // Handle error
} catch (NotFoundException e) {
    // Handle error
} catch (InternalServerErrorException e) {
    // Handle error
} catch (ServiceUnavailableException e) {
    // Handle error
} catch (HttpException e) {
    System.out.println(e.getMessage());
    System.out.println(e.getCode());
}
617 Bytes in 2 ms with coderay