CatchThrowTests

Quick Links

Tests That Should Work

  • (catch 'a 1)
  • (catch 'a (catch 'b 1))
  • (catch 'a (catch 'b 1) 2)
  • (catch 'a (catch 'b (throw 'a 1) 2))
  • (catch 'a (catch 'b (throw 'b 1) 2))
  • (catch 'a (catch 'b (catch 'c (catch 'd (throw 'a 1) 2) 3) 4) 5)

  • (let ((new-tag (list nil))) (catch new-tag (throw new-tag 'zorch)))
  • (let ((new-tag)) (catch (setq new-tag (list nil)) (throw new-tag 'zorch)))

  • (setq temp 'a)
  • (catch temp (throw temp 1) 2)
  • (catch 'a (throw temp 1) 2)
  • (catch temp (throw 'a 1) 2)
  • (catch 'a (throw 'a temp) 2)

Tests That Should Not Work

  • (catch 'a (catch 'b (throw 'c 1) 2))
Topic revision: r4 - 2007-02-13 - 05:07:12 - JimStambaugh
 
Home
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback