Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Cryptic error message when addMenuItem() is passed bad args #3412

Closed
peterflynn opened this issue Apr 11, 2013 · 2 comments
Closed

Cryptic error message when addMenuItem() is passed bad args #3412

peterflynn opened this issue Apr 11, 2013 · 2 comments

Comments

@peterflynn
Copy link
Member

  1. Install the BracketLESS extension
  2. Quit & relaunch Brackets

Result:
Console contains error "addMenuItem() -- error: 3 when adding command: bracketless.enabled" indicating an error code returned from brackets.app.addMenuItem().

Expected:
BracketLESS is doing something wrong here: passing a nonexistent command id as the relativeID arg. However, before the native menu migration we gave much more informative error strings. In this case it would have been "_getRelativeMenuItem(): MenuItem with Command id menu-view-sidebar not found in Menu view-menu". The message we actually show is uninformative and almost looks like brackets-shell bug rather then a problem with the extension's code.

@ghost ghost assigned gruehle Apr 18, 2013
@njx
Copy link

njx commented Apr 18, 2013

Reviewed. Low priority to @gruehle. Glenn, do you think this could be a starter bug? Could it be fixed purely on the JS side by mapping the error codes to strings, or is there more info we'd need to get from the native side in order to provide good errors?

@redmunds
Copy link
Contributor

redmunds commented May 4, 2013

FBNC back to @peterflynn . @TomMalbran fixed this on the JS side.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants