Changeset 12299


Ignore:
Timestamp:
12/18/09 22:12:22 (12 years ago)
Author:
ehuelsmann
Message:

Annotate some remaining "catch (Throwable" occurrences.
While at it: fix handling of ControlTransfer? exceptions in

invocation of code which itself *could* invoke lisp code again.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Java.java

    r12298 r12299  
    216216            error(new LispError("illegal argument"));
    217217        }
    218         catch (Throwable t) {
     218        catch (Throwable t) { // no code -> no ControlTransfer
    219219            error(new LispError(getMessage(t)));
    220220        }
     
    283283                throw e;
    284284            }
    285             catch (Throwable t) {
     285            catch (Throwable t) { // ControlTransfer addressed above
    286286                error(new LispError(getMessage(t)));
    287287            }
     
    341341                throw e;
    342342            }
    343             catch (Throwable t) {
     343            catch (Throwable t) { // ControlTransfer addressed above
    344344                error(new LispError(getMessage(t)));
    345345            }
     
    394394            return JavaObject.getInstance(result, translate);
    395395        }
    396         catch (Throwable t) {
     396        catch (ControlTransfer c) {
     397            throw c;
     398        }
     399        catch (Throwable t) { // ControlTransfer handled above
    397400            if (t instanceof InvocationTargetException)
    398401                t = t.getCause();
     
    459462                return JavaObject.getInstance(constructor.newInstance(initargs));
    460463            }
    461             catch (Throwable t) {
     464            catch (ControlTransfer c) {
     465                throw c;
     466            }
     467            catch (Throwable t) { // ControlTransfer handled above
    462468                if (t instanceof InvocationTargetException)
    463469                    t = t.getCause();
     
    495501                return JavaObject.getInstance(Array.newInstance(c, dimensions));
    496502            }
    497             catch (Throwable t) {
     503            catch (Throwable t) { // no code -> no ControlTransfer
    498504                error(new JavaException(t));
    499505            }
     
    515521                    ((Integer)args[args.length - 1].javaInstance()).intValue()), translate);
    516522        }
    517         catch (Throwable t) {
     523        catch (Throwable t) { // no code -> no ControlTransfer
    518524            Symbol condition = getCondition(t.getClass());
    519525            if (condition == null)
     
    573579                return v;
    574580            }
    575             catch (Throwable t) {
     581            catch (Throwable t) { // no code -> no ControlTransfer
    576582                Symbol condition = getCondition(t.getClass());
    577583                if (condition == null)
     
    654660            throw t;
    655661        }
    656         catch (Throwable t) {
     662        catch (Throwable t) { // ControlTransfer handled above
    657663            if (t instanceof InvocationTargetException)
    658664                t = t.getCause();
Note: See TracChangeset for help on using the changeset viewer.