* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Modifications Copyright © 2018 IBM.
+ * Modifications Copyright (C) 2023 Deutsche Telekom SA.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
public class AAIException extends Exception {
- private static final String UPDATE_ERROR_PROPERTIES_BEFORE_USING_THIS_EXCEPTION_CODE =
- " - update error.properties before using this exception code";
- private static final String FAILED_TO_INSTANTIATE_AAI_EXCEPTION_WITH_CODE =
- "Failed to instantiate AAIException with code=";
public static final String DEFAULT_EXCEPTION_CODE = "AAI_4000";
private static final long serialVersionUID = 1L;
this.code = DEFAULT_EXCEPTION_CODE;
this.templateVars = new LinkedList<>();
- try {
- this.errorObject = ErrorLogHelper.getErrorObject(getCode());
- } catch (ErrorObjectNotFoundException e) {
- throw new RuntimeException(FAILED_TO_INSTANTIATE_AAI_EXCEPTION_WITH_CODE + getCode()
- + UPDATE_ERROR_PROPERTIES_BEFORE_USING_THIS_EXCEPTION_CODE);
- }
+ this.errorObject = ErrorLogHelper.getErrorObject(getCode());
}
/**
this.code = code;
this.templateVars = new LinkedList<>();
-
- try {
- this.errorObject = ErrorLogHelper.getErrorObject(getCode());
- } catch (ErrorObjectNotFoundException e) {
- throw new RuntimeException(FAILED_TO_INSTANTIATE_AAI_EXCEPTION_WITH_CODE + getCode()
- + UPDATE_ERROR_PROPERTIES_BEFORE_USING_THIS_EXCEPTION_CODE);
- }
+ this.errorObject = ErrorLogHelper.getErrorObject(getCode());
}
/**
this.code = code;
this.templateVars = new LinkedList<>();
-
- try {
- this.errorObject = ErrorLogHelper.getErrorObject(getCode());
- errorObject.setDetails(details);
- } catch (ErrorObjectNotFoundException e) {
- throw new RuntimeException(FAILED_TO_INSTANTIATE_AAI_EXCEPTION_WITH_CODE + getCode()
- + UPDATE_ERROR_PROPERTIES_BEFORE_USING_THIS_EXCEPTION_CODE);
- }
+ this.errorObject = ErrorLogHelper.getErrorObject(getCode());
+ errorObject.setDetails(details);
}
/**
this.code = code;
this.templateVars = new LinkedList<>();
-
- try {
- this.errorObject = ErrorLogHelper.getErrorObject(getCode());
- } catch (ErrorObjectNotFoundException e) {
- throw new RuntimeException(FAILED_TO_INSTANTIATE_AAI_EXCEPTION_WITH_CODE + getCode()
- + UPDATE_ERROR_PROPERTIES_BEFORE_USING_THIS_EXCEPTION_CODE);
- }
+ this.errorObject = ErrorLogHelper.getErrorObject(getCode());
}
/**
this.code = code;
this.templateVars = new LinkedList<>();
-
- try {
- this.errorObject = ErrorLogHelper.getErrorObject(getCode());
- } catch (ErrorObjectNotFoundException e) {
- throw new RuntimeException(FAILED_TO_INSTANTIATE_AAI_EXCEPTION_WITH_CODE + getCode()
- + UPDATE_ERROR_PROPERTIES_BEFORE_USING_THIS_EXCEPTION_CODE);
- }
+ this.errorObject = ErrorLogHelper.getErrorObject(getCode());
}
public String getCode() {