diff options
author | Jason Sams <rjsams@android.com> | 2010-11-22 16:20:16 -0800 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2010-11-22 16:20:16 -0800 |
commit | add9d9633205f76cc34f04368b8482c2c369ba63 (patch) | |
tree | cc360ce8783627e98c05f764d99c70dc29cc5b87 /graphics | |
parent | 83d97c8c7ddff9374f876bef48758414a7775cb1 (diff) | |
download | frameworks_base-add9d9633205f76cc34f04368b8482c2c369ba63.zip frameworks_base-add9d9633205f76cc34f04368b8482c2c369ba63.tar.gz frameworks_base-add9d9633205f76cc34f04368b8482c2c369ba63.tar.bz2 |
More error checks
Change-Id: Id2b9ab7a76bbdf2ed745f5e36e552dc9b101982f
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/renderscript/RenderScript.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java index 0660441..f16e045 100644 --- a/graphics/java/android/renderscript/RenderScript.java +++ b/graphics/java/android/renderscript/RenderScript.java @@ -685,6 +685,8 @@ public class RenderScript { public static final int RS_MESSAGE_TO_CLIENT_ERROR = 3; public static final int RS_MESSAGE_TO_CLIENT_USER = 4; + public static final int RS_ERROR_FATAL_UNKNOWN = 0x1000; + MessageThread(RenderScript rs) { super("RSMessageThread"); mRS = rs; @@ -722,6 +724,10 @@ public class RenderScript { if (msg == RS_MESSAGE_TO_CLIENT_ERROR) { String e = mRS.nContextGetErrorMessage(mRS.mContext); + if (subID >= RS_ERROR_FATAL_UNKNOWN) { + throw new RSRuntimeException("Fatal error " + subID + ", details: " + e); + } + if(mRS.mErrorCallback != null) { mRS.mErrorCallback.mErrorMessage = e; mRS.mErrorCallback.mErrorNum = subID; |