added exceptions support to `wire` for sync functions