Skip to content
Sharp

Exceptions interview questions

Custom Exceptions, Error Translation, Raising Exceptions, Try and Except

100 questions with answers and explanations · 92 flashcards

Questions (page 2 of 2)

  1. A senior interviewer asks for one tradeoff behind raising exceptions. What is the strongest follow-up?Multiple choiceHard
  2. Which response shows the healthiest evidence-first mindset around custom exceptions?Multiple choiceHard
  3. A bug appears around custom exceptions. What is the strongest first debugging move?Multiple choiceMedium
  4. Which naming or modeling choice is strongest for error translation?Multiple choiceHard
  5. What kind of contract clarity matters most for raising exceptions?Multiple choiceHard
  6. What production risk should you worry about most if error translation is handled lazily?Multiple choiceHard
  7. A teammate submits shaky raising exceptions code. Which review comment is the strongest?Multiple choiceEasy
  8. Which option describes the most likely pitfall around raising exceptions?Multiple choiceEasy
  9. Which option is the safer default when shipping code around custom exceptions?Multiple choiceHard
  10. Which option is the safer default when shipping code around raising exceptions?Multiple choiceHard
  11. Which naming or modeling choice is strongest for custom exceptions?Multiple choiceMedium
  12. If custom exceptions fails in production, what handling philosophy is strongest?Multiple choiceMedium
  13. Which explanation would sound strongest in an interview when discussing custom exceptions?Multiple choiceMedium
  14. If try and except fails in production, what handling philosophy is strongest?Multiple choiceMedium
  15. Which judgment is strongest when choosing a data shape for try and except?Multiple choiceMedium
  16. Another engineer will maintain this code later. What choice helps the most around try and except?Multiple choiceMedium
  17. A bug appears around try and except. What is the strongest first debugging move?Multiple choiceEasy
  18. What is the healthiest performance judgment around try and except?Multiple choiceMedium
  19. Which explanation would best help the team align on raising exceptions?Multiple choiceMedium
  20. Which move is the best default when try and except become part of this workflow?Multiple choiceEasy
  21. What do interviewers usually hear as a strong signal when you discuss raising exceptions well?Multiple choiceHard
  22. What does a strong engineer do when reasoning through raising exceptions code?Multiple choiceMedium
  23. What production risk should you worry about most if raising exceptions is handled lazily?Multiple choiceMedium
  24. Another engineer will maintain this code later. What choice helps the most around raising exceptions?Multiple choiceMedium
  25. Which option is the safer default when shipping code around try and except?Multiple choiceHard
  26. A teammate submits shaky try and except code. Which review comment is the strongest?Multiple choiceEasy
  27. A senior interviewer asks for one tradeoff behind try and except. What is the strongest follow-up?Multiple choiceHard
  28. Which naming or modeling choice is strongest for try and except?Multiple choiceMedium
  29. Which response shows the healthiest evidence-first mindset around try and except?Multiple choiceHard
  30. Which naming or modeling choice is strongest for raising exceptions?Multiple choiceMedium
  31. Which explanation would best help the team align on try and except?Multiple choiceMedium
  32. What do interviewers usually hear as a strong signal when you discuss try and except well?Multiple choiceHard
  33. What is the healthiest performance judgment around raising exceptions?Multiple choiceMedium
  34. Which judgment is strongest when choosing a data shape for raising exceptions?Multiple choiceMedium
  35. Which explanation would sound strongest in an interview when discussing try and except?Multiple choiceEasy
  36. What kind of contract clarity matters most for try and except?Multiple choiceHard
  37. Which option describes the most likely pitfall around try and except?Multiple choiceEasy
  38. If you wrote a test around try and except, what should the test prove first?Multiple choiceEasy
  39. What is the clearest sign that code around try and except should be refactored?Multiple choiceEasy
  40. What does a strong engineer do when reasoning through try and except code?Multiple choiceMedium
  41. What assumption should be made explicit when working with try and except?Multiple choiceMedium
  42. What assumption should be made explicit when working with raising exceptions?Multiple choiceMedium
  43. You cannot rewrite everything today. What is the best incremental improvement around raising exceptions?Multiple choiceMedium
  44. What production risk should you worry about most if try and except is handled lazily?Multiple choiceMedium
  45. Which option treats try and except as an engineering policy decision instead of a syntax trick?Multiple choiceHard
  46. If raising exceptions fails in production, what handling philosophy is strongest?Multiple choiceMedium
  47. When is raising exceptions being used in the wrong way?Multiple choiceMedium
  48. When is try and except being used in the wrong way?Multiple choiceMedium
  49. You cannot rewrite everything today. What is the best incremental improvement around try and except?Multiple choiceMedium
  50. Which boundary choice best fits try and except in a maintainable Python system?Multiple choiceEasy