add promise support
add local error catching test