support msgs and return error in callback functions, with the help of the msgs, we can pass anything during Emit