Paste number 61211: cerror usage?

Paste number 61211: cerror usage?
Pasted by: |Agent
When:3 years, 8 months ago
Share:Tweet this! | http://paste.lisp.org/+1B8B
Channel:#dylan
Paste contents:
Raw Source | XML | Display As
define method do-something()
   /* Do something. */
   if (failed?)
      cerror("inserted cable %s", "missing cable %s", "com1")
   end if;
   /* Problem corrected, move on. */
end method;

define method caller()
   block() 
      do-something()
   exception (e :: <simple-error>, init-arguments: #[#"format-string", "missing cable %s"])
      format-out("Plug in %s and press key\n", e.format-arguments);
      wait-for-keypress();
      signal(<simple-restart>, format-string: "inserted cable %s",
             format-arguments: e.format-arguments);
   end block;
end method;

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.