only print error code when debug is on.
do not crash in clobj__* with nullptr input, which can happen in exception handler
somehow pypy + nvidia + beignet doesn't like releasing event in another thread.
better debug msg for multi-thread
UserEvent