Commits

Taku Miyakawa  committed d5f3830

Renames lasterror in REPL to last_exception

  • Participants
  • Parent commits b74ea60

Comments (0)

Files changed (2)

File src/main/kink/REPL.kn

     $run_and_show.try.switch(
         [true :Result] { Result }
         [false :Exception] {
-            Env.:lasterror = const_fun(Exception)
+            Env.:last_exception = const_fun(Exception)
             ['runtimeerror' Exception.report]
         }
     )

File src/test/kink/REPL_test.kn

     Repl.Env.last.check(42)
 }
 
-# Tests lasterror
+# Tests last_exception
 test {
     :Repl = REPL.new
     Repl._input('10 / 0')
-    Repl.Env.lasterror.message.check(%'.*10.*')
+    Repl.Env.last_exception.message.check(%'.*10.*')
 }
 
 # Tests _line_num
 test {
     :Repl = REPL.new
     Repl._input('No_such_var')
-    Repl.Env.lasterror.traces.check([any])
+    Repl.Env.last_exception.traces.check([any])
 }
 
 # Runs a REPL.new