Changeset 12760


Ignore:
Timestamp:
06/20/10 20:38:08 (13 years ago)
Author:
ehuelsmann
Message:

Remove separate FaslVersionMismatch? exception in favor of
raising a lispy error directly.

File:
1 edited

Legend:

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

    r12749 r12760  
    199199                                      verbose, print, false, returnLastResult);
    200200        }
    201         catch (FaslVersionMismatch e) {
    202             StringBuilder sb =
    203                 new StringBuilder("Incorrect fasl version: ");
    204             sb.append(truename);
    205             return error(new SimpleError(sb.toString()));
    206         }
    207201        finally {
    208202            if (in != null) {
     
    329323                return loadFileFromStream(pathname, truename, stream,
    330324                                          verbose, print, auto);
    331             } catch (FaslVersionMismatch e) {
    332                 StringBuilder sb =
    333                     new StringBuilder("; Incorrect fasl version: ");
    334                 sb.append(truename);
    335                 System.err.println(sb.toString());
    336325            } finally {
    337326                thread.resetSpecialBindings(mark);
     
    408397
    409398        {
     399            final LispThread thread = LispThread.currentThread();
    410400            if (first == Keyword.VERSION) {
    411401                if (second.eql(_FASL_VERSION_.getSymbolValue())) {
    412402                    // OK
    413                     final LispThread thread = LispThread.currentThread();
    414403                    thread.bindSpecial(_FASL_UNINTERNED_SYMBOLS_, NIL);
    415404                    thread.bindSpecial(_SOURCE_, NIL);
     
    417406                }
    418407            }
    419             throw new FaslVersionMismatch(second);
     408            return
     409                error(new SimpleError("FASL version mismatch; found '"
     410                        + second.writeToString() + "' but expected '"
     411                        + _FASL_VERSION_.getSymbolValue().writeToString()
     412                        + "' in "
     413                        + Symbol.LOAD_PATHNAME.symbolValue(thread).writeToString()));
    420414        }
    421415    }
     
    701695        }
    702696    }
    703 
    704     private static class FaslVersionMismatch extends Error
    705     {
    706         private final LispObject version;
    707 
    708         public FaslVersionMismatch(LispObject version)
    709         {
    710             this.version = version;
    711         }
    712 
    713         public LispObject getVersion()
    714         {
    715             return version;
    716         }
    717     }
    718697}
Note: See TracChangeset for help on using the changeset viewer.