project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Utils.java
changeset 7330 867e4fda496e
parent 7318 a446eafcddeb
child 7332 3f2e130f9715
--- a/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Utils.java	Wed Jul 11 01:52:01 2012 +0200
+++ b/project_files/Android-build/SDL-android-project/src/org/hedgewars/hedgeroid/Utils.java	Mon Jul 16 20:16:03 2012 +0200
@@ -246,4 +246,13 @@
 			writeStreamToFile(resources.openRawResource(resId), f);
 		}
 	}
+	
+	/**
+	 * Crashing - at least it's better than ignoring errors.
+	 */
+	public static void assertZero(int value, String text) {
+		if(value != 0) {
+			throw new RuntimeException("Result is not zero: " + text);
+		}
+	}
 }