Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 400 Bytes

error.md

File metadata and controls

17 lines (13 loc) · 400 Bytes

错误处理

了解如何处理不同类型的 SDK 异常,包括参数错误,RetCode 不为 0 的业务异常等。

try {
    response = client.invoke(request, Response.class);
} catch (ValidatorException e) {
    System.out.println(e.getMessage());
} catch (RetCodeException e) {
    System.out.println(e.getRetCode());
} catch (UCloudException e) {
    e.printStackTrace();
}