Introduce formatting methods for SourceException
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / type / IntegerTypeEffectiveStatementImpl.java
index 5576360b65edce817bf908e8f8549c54918e1243..856e30cb90f3310e52c387ce6e1cee27e4001155 100644 (file)
@@ -48,8 +48,8 @@ public final class IntegerTypeEffectiveStatementImpl extends
             typeDefinition = builder.build();
         } catch (InvalidRangeConstraintException e) {
             final RangeConstraint c = e.getOffendingConstraint();
-            throw new SourceException(String.format("Invalid range constraint: <%s, %s>", c.getMin(), c.getMax()),
-                ctx.getStatementSourceReference(), e);
+            throw new SourceException(ctx.getStatementSourceReference(), e, "Invalid range constraint: <%s, %s>",
+                c.getMin(), c.getMax());
         }
     }