Event and Exception Handling in ::SHE+ILA:: [$53]

182
3
  • Squishy Plushie's avatar Artist
    Squishy Pl...
  • DDG Model
    Artflow
  • Access
    Public
  • Created
    3mos ago
  • Try

Prompt

A beautiful purple-haired woman wearing a long purple velvet ankle-length dress with flouncy sleeves, and purple suede high heels. She is looking at a wall full of plushies.

More about Event and Exception Handling in ::SHE+ILA:: [$53]

For example, suppose we want to catch a divide exception, a terminated thread exception, and a "Sense Switch Interrupt" (Alt-SysRq) event.
{? DIV0 : &{ttyout ("Division by zero"); quit();};
BUFHUNG : &{ttyout("Buffer owner has exited, reader thread halted"); quit();};
ALTSYSRQ : &{ttyout("User pressed sense switch");} ?};
The "{? ... ?}" block serves the dual purpose of a catch() block and an event wait (WT$LAN, WT$LOR, WT$SIG) block. It calls a lambda asynchronously (an AST, asynchronous system trap) when an "expected" (as in Maximop) event occurs, and cascades to an outermost "catch all" handler when an "unexpected" event occurs.

Comments


Loading Dream Comments...

Discover more dreams from this artist