Added test for exec call with errorCode and errorInfo