private static String createMessage(String message, SourceLocation sourceLocation) {
        if (sourceLocation == SourceLocation.NONE) {
            return message;
        } else {
            String prettyLocation = stackTraceForm(sourceLocation);
            return message.contains(prettyLocation) ? message : message + " (" + prettyLocation + ")";
        }
    }
Constructs a new invalid rule exception with the given message and source location.

@param message the detail message.
@param location the location of the invalid rule.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/error/InvalidRulesException.java