File tree Expand file tree Collapse file tree 5 files changed +127
-3
lines changed
fj-core/src/main/java/org/fugerit/java/core Expand file tree Collapse file tree 5 files changed +127
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "title" : " Jupiter (Fugerit Core A.P.I.)" ,
33 "name" : " Jupiter" ,
4- "version" : " 0.8.3 " ,
5- "date" : " 26/11 /2021" ,
4+ "version" : " 0.8.4 " ,
5+ "date" : " 08/12 /2021" ,
66 "organization" : {
77 "name" : " Fugerit Org" ,
88 "url" : " https://www.fugerit.org"
Original file line number Diff line number Diff line change 1- 0.8.3 (2022-11-26)
1+ 0.8.4 (2022-12-08)
2+ ------------------
3+ + Added some Exception and RuntimeException utilities
4+
5+ 0.8.3 (2022-11-26)
26------------------
37+ Added ObjectUtils.objectWithDefault() function
48+ Added options to create a ParamI18N loading keys from a different bundle than the main property key
Original file line number Diff line number Diff line change 1+ package org .fugerit .java .core .cfg ;
2+
3+ public class ConfigExceptionUtils {
4+
5+ public ConfigException stadardExceptionWrapping ( Exception e ) throws ConfigException {
6+ throw new ConfigException ( "Configuration error : " +e , e );
7+ }
8+
9+ public ConfigRuntimeException stadardRuntimeExceptionWrapping ( Exception e ) {
10+ throw new ConfigRuntimeException ( "Configuration error : " +e , e );
11+ }
12+
13+ }
Original file line number Diff line number Diff line change 1+ package org .fugerit .java .core .cfg ;
2+
3+ import org .fugerit .java .core .lang .ex .CodeException ;
4+ import org .fugerit .java .core .lang .ex .CodeRuntimeException ;
5+
6+ public class ConfigRuntimeException extends CodeRuntimeException {
7+
8+ /**
9+ *
10+ */
11+ private static final long serialVersionUID = -6673695755105239L ;
12+
13+ /**
14+ * <p>Default value for the code field in a ConfigRuntimeException.</p>
15+ */
16+ public static final int DEFAULT_CODE = CodeException .DEFAULT_CODE ;
17+
18+ public ConfigRuntimeException () {
19+ super ();
20+ }
21+
22+ public ConfigRuntimeException (int code ) {
23+ super (code );
24+ }
25+
26+ public ConfigRuntimeException (String message , int code ) {
27+ super (message , code );
28+ }
29+
30+ public ConfigRuntimeException (String message , Throwable cause , int code ) {
31+ super (message , cause , code );
32+ }
33+
34+ public ConfigRuntimeException (String message , Throwable cause ) {
35+ super (message , cause );
36+ }
37+
38+ public ConfigRuntimeException (String message ) {
39+ super (message );
40+ }
41+
42+ public ConfigRuntimeException (Throwable cause , int code ) {
43+ super (cause , code );
44+ }
45+
46+ public ConfigRuntimeException (Throwable cause ) {
47+ super (cause );
48+ }
49+
50+ }
Original file line number Diff line number Diff line change 1+ package org .fugerit .java .core .lang .ex ;
2+
3+ public class CodeRuntimeException extends RuntimeException {
4+
5+ /**
6+ *
7+ */
8+ private static final long serialVersionUID = -814496260491L ;
9+
10+ /**
11+ * <p>Default value for the code field in a ConfigRuntimeException.</p>
12+ */
13+ public static final int DEFAULT_CODE = CodeException .DEFAULT_CODE ;
14+
15+ private final int code ;
16+
17+ public int getCode () {
18+ return code ;
19+ }
20+
21+ public CodeRuntimeException () {
22+ this ( DEFAULT_CODE );
23+ }
24+
25+ public CodeRuntimeException (String message , Throwable cause ) {
26+ this (message , cause , DEFAULT_CODE );
27+ }
28+
29+ public CodeRuntimeException (String message ) {
30+ this (message , DEFAULT_CODE );
31+ }
32+
33+ public CodeRuntimeException (Throwable cause ) {
34+ this (cause , DEFAULT_CODE );
35+ }
36+
37+ public CodeRuntimeException ( int code ) {
38+ super ();
39+ this .code = code ;
40+ }
41+
42+ public CodeRuntimeException (String message , Throwable cause , int code ) {
43+ super (message , cause );
44+ this .code = code ;
45+ }
46+
47+ public CodeRuntimeException (String message , int code ) {
48+ super (message );
49+ this .code = code ;
50+ }
51+
52+ public CodeRuntimeException (Throwable cause , int code ) {
53+ super (cause );
54+ this .code = code ;
55+ }
56+
57+ }
You can’t perform that action at this time.
0 commit comments