Skip to content

Commit e2505b5

Browse files
AlexElintimonback
andauthored
(refactor): improve exception message (#1277)
* (refactor): improve exception message It has been unclear that the text after a colon is a schema's name. This PR makes this clear. * chore(core): apply formatter --------- Co-authored-by: Timon Back <[email protected]>
1 parent ee9aa0e commit e2505b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

springwolf-core/src/main/java/io/github/springwolf/core/asyncapi/components/examples/walkers/DefaultSchemaWalker.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,8 @@ private Optional<Schema<?>> resolveSchemaFromRef(Schema schema, Map<String, Sche
337337
String schemaName = ReferenceUtil.getLastSegment(ref);
338338
Schema<?> resolvedSchema = definitions.get(schemaName);
339339
if (resolvedSchema == null) {
340-
throw new ExampleGeneratingException("Missing schema during example generation: " + schemaName);
340+
throw new ExampleGeneratingException(
341+
String.format("Missing schema (name = %s) during example generation", schemaName));
341342
}
342343
return Optional.of(resolvedSchema);
343344
}

0 commit comments

Comments
 (0)