Bladeren bron

Amélioration message d'erreur

Arthur Brandao 6 jaren geleden
bovenliggende
commit
04b7d012e4
1 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. 4 4
      src/migl/lisp/LispElement.java

+ 4 - 4
src/migl/lisp/LispElement.java

@@ -41,7 +41,7 @@ public class LispElement {
 		if(this.value.getClass() == BigInteger.class) {
 			return (BigInteger) this.value;
 		}
-		throw new IllegalStateException("Value is not an integer");
+		throw new IllegalStateException("Not an integer");
 	}
 	
 	/**
@@ -57,7 +57,7 @@ public class LispElement {
 		} else if(this.value.getClass() == Double.class) {
 			return (Double) this.value;
 		}
-		throw new IllegalStateException("Value is not a number");
+		throw new IllegalStateException("Not a number");
 	}
 	
 	/**
@@ -71,7 +71,7 @@ public class LispElement {
 			LispBoolean lb = (LispBoolean) this.value;
 			return lb.value();
 		}
-		throw new IllegalStateException("Value is not a Lisp boolean");
+		throw new IllegalStateException("Not a Boolean");
 	}
 	
 	/**
@@ -84,7 +84,7 @@ public class LispElement {
 		if(this.value.getClass() == String.class) {
 			return (String) this.value;
 		}
-		throw new IllegalStateException("Value is not a String");
+		throw new IllegalStateException("Not a String");
 	}
 
 	@Override