private static String stackTraceForm(SourceLocation sourceLocation) {
        if (sourceLocation == SourceLocation.NONE) {
            return "N/A";
        }

        StringBuilder sb = new StringBuilder();
        if (sourceLocation.getFilename() != null) {
            sb.append(sourceLocation.getFilename());
        }
        if (sourceLocation.getLine() != 0) {
            sb.append(":").append(sourceLocation.getLine());
        }
        // column is ignored in stack trace form
        return sb.toString();
    }
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