Skip to content

Commit

Permalink
tdd
Browse files Browse the repository at this point in the history
  • Loading branch information
acamposs committed Aug 14, 2024
1 parent 4870e10 commit da0e7dd
Show file tree
Hide file tree
Showing 7 changed files with 425 additions and 183 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
package teammates.common.exception;

import java.io.IOException;

import org.apache.solr.client.solrj.SolrServerException;

/**
* Exception thrown when error is encountered while performing search.
*/
public class SearchServiceException extends Exception {

private final int statusCode;

public SearchServiceException(String message, Throwable cause, int statusCode) {
super(message, cause);
this.statusCode = statusCode;
}

public SearchServiceException(Throwable cause, int statusCode) {
super(cause);
this.statusCode = statusCode;
public SearchServiceException(IOException e, int scBadGateway) {
super(e);
this.statusCode = scBadGateway;
}

public SearchServiceException(String message, int statusCode) {
super(message);
this.statusCode = statusCode;
public SearchServiceException(SolrServerException e, int scBadGateway) {
super(e);
this.statusCode = scBadGateway;
}

public SearchServiceException(String string, int i) {
super(string);
this.statusCode = i;
}

public int getStatusCode() {
Expand Down
Loading

0 comments on commit da0e7dd

Please sign in to comment.