Finish 0b7a3f5efbbbad94c421e34855b7168f04d4d92d (unify common functions).
Improve error handling and messaging while at --list:opencl-devices.