Revised InvocableHandlerMethod exception messages (controller vs endpoint vs handler)
Introduces dedicated MethodArgumentResolutionException for spring-messaging invocations. Issue: SPR-15139
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 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.
|
||||
@@ -93,7 +93,7 @@ public class InvocableHandlerMethodTests {
|
||||
fail("Expected exception");
|
||||
}
|
||||
catch (IllegalStateException ex) {
|
||||
assertTrue(ex.getMessage().contains("No suitable resolver for argument [0] [type=java.lang.Integer]"));
|
||||
assertTrue(ex.getMessage().contains("No suitable resolver for argument 0 of type 'java.lang.Integer'"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ public class InvocableHandlerMethodTests {
|
||||
catch (IllegalStateException actual) {
|
||||
assertNotNull(actual.getCause());
|
||||
assertSame(expected, actual.getCause());
|
||||
assertTrue(actual.getMessage().contains("Failed to invoke controller method"));
|
||||
assertTrue(actual.getMessage().contains("Failed to invoke handler method"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user