Exception

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2023 Sep 13 3:25
Editor
Edited
Edited
2024 Sep 12 22:41

Software interrupt, Synchronous interrupt

Handle programming error or anomalous hardware conditions
Generated by the CPU while executing instruction
  • Anomalous conditions that must be handled by kernel
    • page fault
    • floating-point error
  • Debugger
  1. Save the contents of most registers in the Kernel Mode stack
  1. Handle the exception
  1. Exit from the handler from ret_from_exception()
Exception Notion
notion image
 
 
 
 
Why I Prefer Exceptions to Error Values
Exceptions are often a better way to handle errors than returning them as values. We argue that traditional exceptions provide better user and developer experience, and show that they even result in faster execution.
 
 
 

Recommendations