Skip to content

Commit

Permalink
Add JavaDoc for ApiNotPresentException
Browse files Browse the repository at this point in the history
  • Loading branch information
ole-ve committed Dec 3, 2024
1 parent 3314c3d commit 9e0a4d9
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
package de.tum.cit.aet.artemis.core.exception;

/**
* Exception that an optionally autowired API is not present.
* This is caused by Spring profiles not being present.
*/
public class ApiNotPresentException extends RuntimeException {

/**
* Constructor.
*
* @param api name of the api class
* @param profile name of the Spring profile that needs to be enabled.
*/
public ApiNotPresentException(String api, String profile) {
super(String.format("Api %s is not enabled, because Spring profile %s is not enabled. Did you enable it?", api, profile));
}
Expand Down

0 comments on commit 9e0a4d9

Please sign in to comment.