pass stack debugging info to onError function