Skip to content

Better error handling with package capitalisation conflicts #1716

@radical-sam

Description

@radical-sam

When attempting to create a class in an existing package with different capitalisation, it fails and you just get an error in the Output like...

Body of '400 Bad Request' response to /api/atelier/v8/USER/doc/Myproject.Msg.Blah.cls?ignoreConflict=1 request is not JSON. Is the web server suppressing detailed errors?

After much troubleshooting, we got to the bottom of it by trying to create the class from terminal, which provides a much more helpful error message...

Set cd = ##class(%Dictionary.ClassDefinition).%New()
Set cd.Name = "Myproject.Msg.Blah"
Set cd.Super = "%RegisteredObject"
Set sc = cd.%Save()
Do $SYSTEM.Status.DisplayError(sc)

ERROR #5093: Name conflict on class 'Myproject.Msg.Blah' because package 'MyProject' has the same name but differs in case.

It would be awesome if the extension could display exactly this message in the Output of VS Code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions