-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle errors related to KeySignature class instance methods #103
Comments
This looks like it's still open, I'll add these try catch where keySignature is used. Is there a specific error handling pattern / method desired? |
Yeah pls go ahead. Not anything in particular really — simple Do follow these guidelines though. |
Regarding uses of KeySignature, the only use in other files I found which wasn't wrapped in a try catch was its instantiation in currentPitch.ts (not including the py files in archive which I assume can be left as-is). I've added the try catch block to this instantiation and ensured that tests still pass. and linting does as well Would you like me to add tests for this? I'm struggling to think of tests to add without mocking the KeySignature constructor to force it to throw an error |
There are 11 methods (one of which is the constructor and another is a setter) which throw errors. The objective is to do a However, the bulk of this issue is w.r.t. the test file corresponding to KeySignature in This is a rough idea, please report a list of what you think needs to be done re this issue in a comment ... I'll review that and you could then create a PR? |
Hey sorry, something came up, and I'll need to step away from this issue at this time I apologise. |
@meganindya, is this issue still there? |
yeah go ahead. |
All I need to do is to add try-catch block on each function of keySignature.ts? |
On branch
musicutils
, TypeScript ported filekeySignature.ts
has some of this methods including theconstructor
throw errors.Handle with
try catch
calls to all such instances in other files.The text was updated successfully, but these errors were encountered: