-
Notifications
You must be signed in to change notification settings - Fork 85
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
written assignment error handling #1140
base: develop
Are you sure you want to change the base?
Conversation
raise error | ||
|
||
raise "Some error" | ||
|
||
raise {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think these will be allowed in python, it will cause type errors.
prerequisites: | ||
hard: | ||
- error-handling/javascript-error-handling | ||
- error-handling/python-error-handling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are the prerequisite correct?
1. In your programming language, what is the fundamental purpose of error handling, and why is it crucial in software development? | ||
|
||
2. In your programming language, what are some poor practices in error handling that developers should avoid? Provide examples if possible. | ||
|
||
3. In your programming language, when should developers catch and handle errors, and what factors should influence this decision? | ||
|
||
4. In your programming language, demonstrate how to raise a custom error with a specific error message. Write a code snippet that showcases this, and explain why it's essential to include clear error messages in custom exceptions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I don't think the "In your programming language" part is necessary for questions that are general and don't involve code.
- I think it would be good to have some code snippets related questions too and have the learner pick and explain certaint things like in the tdd written assignment.
- I think a question about why we use try catch/except when handling errors would be good because most learners don't know that it's for graceful handling of errors instead of breaking the whole program when it's not necessary
- I think this should be one question, you can rephrase the it or remove the part from "and"
- I think we should explicitly say if we want the learners to provide examples and mention how many(E.g. "provide at least 1 example")
- I think this could be rephrased to one question or the last part of the question removed or made it's own question
- We should also link to the submission instructions for written assignments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The prerequisite are wrong. E.g. If you are doing web dev, you won't be able to work on this assignment because you haven't done the java and python error handling topics
- I also think we should try and follow the test-driven development written assignments(
umuzi/ACN-syllabus/content/topics/test-driven-development-questions/_index.md
) as much as possible. This means: creating a topic that covers general info about error handling. E.g. the intro of each topic since it's being repeated in each language topic. Then in that topic we can link to language specific topics for error handling. We can then link this new topic as the prerequisite to this assignment
|
||
1. What is the fundamental purpose of error handling? | ||
|
||
2. What are some poor practices in error handling that developers should avoid? Provide 1 example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"In your programming language" should be mentioned somewhere in this sentence since we require an example
} | ||
``` | ||
|
||
please select and write one snippet that is a good example of error handling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "In your programming language", should also be included in this sentence.
- We could also ask them to explain why.
- Which example would you say is good in the snippets? I think the "good" example could be improved. E.g.
try {
// Code...
} catch (error) {
throw new Error(`Unexpected error occured while doing ${action} with ${computerSpecs}. Error stack: ${JSON.stringify(error.stack)}`)
}
This is just an example of rethrowing with more context while not ignoring the caught error
Related issues: [please specify]
Description:
What are you up to? Fill us in :)
I solemnly swear that: