diff --git a/mybatis-flex-core/src/main/java/com/mybatisflex/core/exception/MybatisFlexException.java b/mybatis-flex-core/src/main/java/com/mybatisflex/core/exception/MybatisFlexException.java index 20fd8938..29f2e09a 100644 --- a/mybatis-flex-core/src/main/java/com/mybatisflex/core/exception/MybatisFlexException.java +++ b/mybatis-flex-core/src/main/java/com/mybatisflex/core/exception/MybatisFlexException.java @@ -65,6 +65,9 @@ public class MybatisFlexException extends RuntimeException { } private String getMessage(Locale locale) { + if (pattern == null) { + return super.getMessage(); + } String localizedString = pattern.getLocalizedString(locale); return MessageFormat.format(localizedString, arguments); }