Exception Handling

This refers to the method of catching and handling an exception object (Exception) that has been thrown.

1. When the program must proceed regardless of the processing result of a certain business logic

try {
    ...
} catch (DefaultApplicationException e) {
    // Handle
}

2. When changing the error message

The exception is caught and then thrown again. When creating a new Exception, pass the caught Exception as a parameter.

try {
    ...
} catch (DefaultApplicationException e) {
    throw new DefaultApplicationException("BXME30007", null, e);
}

3. When catching a specific exception and processing the message

try {
    ...
} catch (DasDuplicateKeyException e) {
    throw new DefaultApplicationException("BXME30011", new Object[] {empNo}, e);
}
SWLab Bankware Global
  • 전체
  • BXM
  • BXCM
  • BXCP
  • BXI
제품 선택 시 더 정확한 매뉴얼 가이드를 제공해드립니다.

Copyright© Bankwareglobal All Rights Reserved.