Could CUDA.jl be better at explaining what went wrong

The problem is the same function running without any error still contains string interpolation code, which can be expensive in hot paths for a number of reasons. The function might otherwise be just a few lines of assembly.

Its not hugely important, but if you are about to embark on an error improving crusade you will want to know that it’s not overhead free in hot paths, and tricks like using @noinline _some_error() = error functions moved outside the main function is quite common. See : Make Julia’s Error Codes Even Better Than Elm’s - #13 by StefanKarpinski and the discussion below.

And yes as @mkitti says, fork the repo on github, make an appropriately named branch, push your changes, and make a pull request to the original repo with a description of your reasoning.