enhancement: xdjs now does global onerror handling. (redirect the errmsg to frontendpy for logging)