Improve assertion message in PersistenceExceptionTranslationInterceptor
Closes gh-24484
This commit is contained in:
parent
ce2c0e4c79
commit
711fafc924
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -146,7 +146,7 @@ public class PersistenceExceptionTranslationInterceptor
|
|||
else {
|
||||
PersistenceExceptionTranslator translator = this.persistenceExceptionTranslator;
|
||||
if (translator == null) {
|
||||
Assert.state(this.beanFactory != null, "No PersistenceExceptionTranslator set");
|
||||
Assert.state(this.beanFactory != null, "Cannot use PersistenceExceptionTranslator autodetection without ListableBeanFactory");
|
||||
translator = detectPersistenceExceptionTranslators(this.beanFactory);
|
||||
this.persistenceExceptionTranslator = translator;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue