{"record":{"id":"2670444818b095ef","repo":"oracle/graal","slug":"unknown-verbosity","errorCode":null,"errorMessage":"unknown verbosity: ","messagePattern":"unknown verbosity: ","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/graph/Node.java","lineNumber":1855,"sourceCode":"            case Long:\n                return toString(Verbosity.Short);\n            case AllVerbose:\n            case All: {\n                StringBuilder str = new StringBuilder();\n                str.append(toString(Verbosity.Short)).append(\" { \");\n                for (Map.Entry<Object, Object> entry : getDebugProperties().entrySet()) {\n                    if (verbosity == Verbosity.All) {\n                        if (entry.getKey().equals(NODE_INSERTION_POSITION_NAME) || entry.getKey().equals(NODE_SOURCE_POSITION_NAME)) {\n                            continue;\n                        }\n                    }\n                    str.append(entry.getKey()).append(\"=\").append(entry.getValue()).append(\", \");\n                }\n                str.append(\" }\");\n                return str.toString();\n            }\n            default:\n                throw new RuntimeException(\"unknown verbosity: \" + verbosity);\n        }\n    }\n\n    /**\n     * Note that this is not a stable identity. It's updated when a node is\n     * {@linkplain #markDeleted() deleted} or potentially when its graph is\n     * {@linkplain StructuredGraph#maybeCompress compressed}.\n     *\n     * @see NodeIdAccessor\n     */\n    @Deprecated\n    public int getId() {\n        return id;\n    }\n\n    @Deprecated\n    public int getIdBeforeDeletion() {\n        assert isDeleted();","sourceCodeStart":1837,"sourceCodeEnd":1873,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/graph/Node.java#L1837-L1873","documentation":"Node.toString(Verbosity) renders a node with a switch over the Verbosity enum (Name, Id, Properties, All, ...). The default branch throws RuntimeException when the switch falls through, which happens when toString is called with a Verbosity constant the switch does not handle, or with null. It is a defensive exhaustiveness check: adding a Verbosity constant without extending the switch (or passing an unexpected value) trips it.","triggerScenarios":"Calling node.toString(Verbosity) with a value outside the handled set (e.g. a newly added enum constant like Verbosity.Stack or a null reference). Extending the Verbosity enum in a fork of the compiler and printing nodes with the new constant. Debug printers that forward a user-supplied verbosity straight into this method.","commonSituations":"Custom debug/logging code that formats nodes with a chosen verbosity. Forks or newer Graal versions that added Verbosity constants while this switch was not updated. Passing null verbosity due to an unset option.","solutions":["Use one of the standard constants the switch handles: Verbosity.Name, Verbosity.Id, Verbosity.Properties, or Verbosity.All.","Null-check verbosity before calling toString(Verbosity) and default to Verbosity.Name.","If you added a Verbosity constant, add a matching case to the switch in Node.toString(Verbosity)."],"exampleFix":"// before\nString s = node.toString(verbosity); // throws for unhandled constant\n\n// after\nString s = node.toString(verbosity != null ? verbosity : Verbosity.Name);","handlingStrategy":"validation","validationCode":"static Verbosity safe(Verbosity v) {\n    return (v == Verbosity.Name || v == Verbosity.Id || v == Verbosity.Properties || v == Verbosity.All) ? v : Verbosity.Name;\n}\nString s = node.toString(safe(verbosity));","typeGuard":"private static boolean isSupportedVerbosity(Verbosity v) {\n    return v == Verbosity.Name || v == Verbosity.Id || v == Verbosity.Properties || v == Verbosity.All;\n}","tryCatchPattern":null,"preventionTips":["Never forward unvetted verbosity values from configuration into toString(Verbosity).","When adding Verbosity constants in a fork, grep Node.java for the switch and extend it in the same change."],"tags":["java","graal","graal-compiler","debugging","enum","tostring"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}