-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc6f613
commit afd6370
Showing
8 changed files
with
94 additions
and
19 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
matcher/src/main/java/com/profile/matcher/arhitecture/BaseException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,35 @@ | ||
package com.profile.matcher.arhitecture; | ||
|
||
import org.springframework.http.HttpStatus; | ||
|
||
import static com.profile.matcher.utils.Constants.ErrorCode.DEFAULT_ERROR_CODE; | ||
|
||
public class BaseException extends RuntimeException { | ||
|
||
private final String code; | ||
private final HttpStatus status; | ||
|
||
public BaseException(String message) { | ||
super(message); | ||
this.code = DEFAULT_ERROR_CODE; | ||
this.status = HttpStatus.INTERNAL_SERVER_ERROR; | ||
} | ||
|
||
public BaseException(String message, Throwable cause) { | ||
super(message, cause); | ||
this.code = DEFAULT_ERROR_CODE; | ||
this.status = HttpStatus.INTERNAL_SERVER_ERROR; | ||
} | ||
|
||
public BaseException(String message, Throwable cause, String code, HttpStatus status) { | ||
super(message, cause); | ||
this.code = code; | ||
this.status = status; | ||
} | ||
|
||
public BaseException(String message, String code, HttpStatus status) { | ||
super(message); | ||
this.status = status; | ||
this.code = code; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
matcher/src/main/java/com/profile/matcher/exception/FindCurrentCampaignException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.profile.matcher.exception; | ||
|
||
import com.profile.matcher.arhitecture.BaseException; | ||
import org.springframework.http.HttpStatus; | ||
|
||
public class FindCurrentCampaignException extends BaseException { | ||
|
||
public FindCurrentCampaignException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public FindCurrentCampaignException(String message, String code, HttpStatus status) { | ||
super(message, code, status); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
matcher/src/main/java/com/profile/matcher/exception/FindPlayerDetailsException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.profile.matcher.exception; | ||
|
||
import com.profile.matcher.arhitecture.BaseException; | ||
import org.springframework.http.HttpStatus; | ||
|
||
public class FindPlayerDetailsException extends BaseException { | ||
|
||
public FindPlayerDetailsException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public FindPlayerDetailsException(String message, String code, HttpStatus status) { | ||
super(message, code, status); | ||
} | ||
} |
14 changes: 0 additions & 14 deletions
14
matcher/src/main/java/com/profile/matcher/exception/NotAllowedException.java
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
matcher/src/main/java/com/profile/matcher/exception/UpdatePlayerDetailsException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.profile.matcher.exception; | ||
|
||
import com.profile.matcher.arhitecture.BaseException; | ||
|
||
public class UpdatePlayerDetailsException extends BaseException { | ||
|
||
public UpdatePlayerDetailsException(String message) { | ||
super(message); | ||
} | ||
|
||
public UpdatePlayerDetailsException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters