Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit05207fc

Browse files
committed
Externalize internal error messages
1 parentc5b45b0 commit05207fc

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

‎src/main/java/org/mybatis/dynamic/sql/util/GeneralInsertMappingVisitor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@
1818
publicabstractclassGeneralInsertMappingVisitor<R>implementsColumnMappingVisitor<R> {
1919
@Override
2020
publicfinalRvisit(SelectMappingmapping) {
21-
thrownewUnsupportedOperationException();
21+
thrownewUnsupportedOperationException(Messages.getString("ERROR.31","1"));//$NON-NLS-1$ //$NON-NLS-2$
2222
}
2323

2424
@Override
2525
publicfinalRvisit(PropertyMappingmapping) {
26-
thrownewUnsupportedOperationException();
26+
thrownewUnsupportedOperationException(Messages.getString("ERROR.31","2"));//$NON-NLS-1$ //$NON-NLS-2$
2727
}
2828

2929
@Override
3030
publicfinalRvisit(PropertyWhenPresentMappingmapping) {
31-
thrownewUnsupportedOperationException();
31+
thrownewUnsupportedOperationException(Messages.getString("ERROR.31","3"));//$NON-NLS-1$ //$NON-NLS-2$
3232
}
3333

3434
@Override
3535
publicfinalRvisit(ColumnToColumnMappingcolumnMapping) {
36-
thrownewUnsupportedOperationException();
36+
thrownewUnsupportedOperationException(Messages.getString("ERROR.31","4"));//$NON-NLS-1$ //$NON-NLS-2$
3737
}
3838
}

‎src/main/java/org/mybatis/dynamic/sql/util/InsertMappingVisitor.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,26 @@
1818
publicabstractclassInsertMappingVisitor<R>implementsColumnMappingVisitor<R> {
1919
@Override
2020
publicfinal <T>Rvisit(ValueMapping<T>mapping) {
21-
thrownewUnsupportedOperationException();
21+
thrownewUnsupportedOperationException(Messages.getString("ERROR.31","5"));//$NON-NLS-1$ //$NON-NLS-2$
2222
}
2323

2424
@Override
2525
publicfinal <T>Rvisit(ValueOrNullMapping<T>mapping) {
26-
thrownewUnsupportedOperationException();
26+
thrownewUnsupportedOperationException(Messages.getString("ERROR.31","6"));//$NON-NLS-1$ //$NON-NLS-2$
2727
}
2828

2929
@Override
3030
publicfinal <T>Rvisit(ValueWhenPresentMapping<T>mapping) {
31-
thrownewUnsupportedOperationException();
31+
thrownewUnsupportedOperationException(Messages.getString("ERROR.31","7"));//$NON-NLS-1$ //$NON-NLS-2$
3232
}
3333

3434
@Override
3535
publicfinalRvisit(SelectMappingmapping) {
36-
thrownewUnsupportedOperationException();
36+
thrownewUnsupportedOperationException(Messages.getString("ERROR.31","8"));//$NON-NLS-1$ //$NON-NLS-2$
3737
}
3838

3939
@Override
4040
publicfinalRvisit(ColumnToColumnMappingcolumnMapping) {
41-
thrownewUnsupportedOperationException();
41+
thrownewUnsupportedOperationException(Messages.getString("ERROR.31","9"));//$NON-NLS-1$ //$NON-NLS-2$
4242
}
4343
}

‎src/main/java/org/mybatis/dynamic/sql/util/MultiRowInsertMappingVisitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
publicabstractclassMultiRowInsertMappingVisitor<R>extendsInsertMappingVisitor<R> {
1919
@Override
2020
publicfinalRvisit(PropertyWhenPresentMappingmapping) {
21-
thrownewUnsupportedOperationException();
21+
thrownewUnsupportedOperationException(Messages.getString("ERROR.31","12"));//$NON-NLS-1$ //$NON-NLS-2$
2222
}
2323
}

‎src/main/java/org/mybatis/dynamic/sql/util/UpdateMappingVisitor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
publicabstractclassUpdateMappingVisitor<R>implementsColumnMappingVisitor<R> {
1919
@Override
2020
publicfinalRvisit(PropertyMappingmapping) {
21-
thrownewUnsupportedOperationException();
21+
thrownewUnsupportedOperationException(Messages.getString("ERROR.31","10"));//$NON-NLS-1$ //$NON-NLS-2$
2222
}
2323

2424
@Override
2525
publicfinalRvisit(PropertyWhenPresentMappingmapping) {
26-
thrownewUnsupportedOperationException();
26+
thrownewUnsupportedOperationException(Messages.getString("ERROR.31","11"));//$NON-NLS-1$ //$NON-NLS-2$
2727
}
2828
}

‎src/main/resources/org/mybatis/dynamic/sql/util/messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ ERROR.27=You must specify a "from" clause before any other clauses in a select s
4646
ERROR.28=You must specify a select statement in a sub query
4747
ERROR.29=Insert Select Statements Must Contain an "into" phrase
4848
ERROR.30=The parameters for insertMultipleWithGeneratedKeys must contain exactly one parameter of type String
49+
ERROR.31=Internal Error {0}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp