Pārlūkot izejas kodu

Fix read.location bug.

FIxed inconsistency with read.item to throw recoverable exceptions instead of CodeHaltException.
Niklas Seyfarth 6 gadi atpakaļ
vecāks
revīzija
23ccfad5ec
1 mainītis faili ar 2 papildinājumiem un 4 dzēšanām
  1. 2 4
      src/main/java/me/km/api/Location.java

+ 2 - 4
src/main/java/me/km/api/Location.java

@@ -82,13 +82,11 @@ public class Location
                 this.pitch = 0;
                 return;
             }
-            sc.getLogger().printException(new IllegalStringLocationException(location), "read.location", sc, sc.getActiveRealCodeLine());
-            throw new HoldCodeException();
+            throw new IllegalStringLocationException(location);
         }
         catch(PatternSyntaxException | NumberFormatException ex)
         {
-            sc.getLogger().printException(new IllegalStringLocationException(location), "read.location", sc, sc.getActiveRealCodeLine());
-            throw new HoldCodeException();
+            throw new IllegalStringLocationException(location);
         }
     }