From 4b69c5eed80085181c45d9cfb90ea79ecc133bf0 Mon Sep 17 00:00:00 2001
From: Matt Wala <wala1@illinois.edu>
Date: Tue, 13 Nov 2018 22:27:28 -0600
Subject: [PATCH] More useful error messages

---
 pyopencl/algorithm.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pyopencl/algorithm.py b/pyopencl/algorithm.py
index a5576796..413af08e 100644
--- a/pyopencl/algorithm.py
+++ b/pyopencl/algorithm.py
@@ -1120,12 +1120,12 @@ class ListOfListsBuilder:
                     data_args.append(arg_val)
                     if arg_descr.with_offset:
                         raise ValueError(
-                                "with_offset=True specified for argument '%d' "
-                                "but the argument is not an array." % i)
+                                "with_offset=True specified for argument %d "
+                                "but the argument is not an array" % i)
                     continue
 
                 if arg_val.ndim != 1:
-                    raise ValueError("Only 1D arrays supported")
+                    raise ValueError("argument %d is a multidimensional array" % i)
 
                 data_args.append(arg_val.base_data)
                 if arg_descr.with_offset:
-- 
GitLab