```\nfunction callAndRevert(address to, bytes memory data, uint256 maxLen) internal {\n    bool success = call(to,0,data,gasleft());\n    if (!success) {\n        revertWithData(getReturnData(maxLen));\n    }\n}\n```\n