Skip to content

Commit 2f0d66d

Browse files
committed
Initialize MeiliSearchException class
1 parent 54d25f8 commit 2f0d66d

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.meilisearch.sdk;
2+
3+
public class MeiliSearchApiException extends MeiliSearchException {
4+
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package com.meilisearch.sdk;
2+
3+
public class MeiliSearchCommunicationException extends MeiliSearchException {
4+
5+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package com.meilisearch.sdk;
2+
3+
public class MeiliSearchException extends Exception {
4+
5+
/**
6+
* This is a generic class for MeiliSearch Exception handling
7+
*/
8+
9+
String message;
10+
String errorCode;
11+
String errorLink;
12+
13+
public String getMessage () {
14+
return this.message;
15+
}
16+
17+
public String getErrorCode () {
18+
return this.errorCode;
19+
}
20+
21+
public String getErrorLink () {
22+
return this.errorLink;
23+
}
24+
25+
public void setMessage (String message) {
26+
this.message = message;
27+
}
28+
29+
public void setErrorCode (String errorCode) {
30+
this.errorCode = errorCode;
31+
}
32+
33+
public void setErrorLink (String errorLink) {
34+
this.errorLink = errorLink;
35+
}
36+
}

0 commit comments

Comments
 (0)