Adds DI and SPI examples

This commit is contained in:
2020-03-15 18:59:33 +01:00
parent 9f120b6317
commit e407698e84
20 changed files with 302 additions and 3 deletions

View File

@ -1,7 +1,7 @@
package annotations.jsonserializer;
class JsonSerializeException extends RuntimeException {
JsonSerializeException(String message) {
super(message);
public JsonSerializeException(String message, Throwable cause) {
super(message, cause);
}
}

View File

@ -21,7 +21,7 @@ class SerializableFieldExtractor {
}
return jsonElements;
} catch (SecurityException | IllegalArgumentException | IllegalAccessException e) {
throw new JsonSerializeException(e.getMessage());
throw new JsonSerializeException("JSON serializing error", e);
}
}