Object except = serializer.readFromHeap(null, true, ref);
if(except instanceof Error){
Error except_th = (Error) except;
throw except_th;
} else if(except instanceof GpuException){
GpuException gpu_except = (GpuException) except;
throw new ArrayIndexOutOfBoundsException("array_index: "+gpu_except.m_arrayIndex+
" array_length: "+gpu_except.m_arrayLength+" array: "+gpu_except.m_array);
} else {
throw new RuntimeException((Throwable) except);
}