Changeset 10282


Ignore:
Timestamp:
10/30/05 09:47:33 (16 years ago)
Author:
asimon
Message:

WITH-REGISTERED-EXCEPTION

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/tests/test-utilities.lisp

    r10229 r10282  
    22;;;
    33;;; Copyright (C) 2005 Peter Graves
    4 ;;; $Id: test-utilities.lisp,v 1.3 2005-10-25 15:49:05 piso Exp $
     4;;; $Id: test-utilities.lisp,v 1.4 2005-10-30 09:47:33 asimon Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    2424(in-package #:regression-test)
    2525
    26 (export 'signals-error)
     26(export '(signals-error with-registered-exception))
    2727
    2828(defmacro signals-error (form error-name)
     
    3131       (error (c) (typep c ,error-name))
    3232       (:no-error (&rest ignored) (declare (ignore ignored)) nil))))
     33
     34(defmacro with-registered-exception (exception condition &body body)
     35  `(unwind-protect
     36       (progn
     37         (java:register-java-exception ,exception ,condition)
     38         ,@body)
     39    (java:unregister-java-exception ,exception)))
Note: See TracChangeset for help on using the changeset viewer.