diff --git a/frameworks/ets/ani/connection/src/connection_ani.cpp b/frameworks/ets/ani/connection/src/connection_ani.cpp index 0c60427bab624da9479dbdaf130fc3761b56e0db..31b2088e6aeef05680b35f85a95412ceacc27b0b 100644 --- a/frameworks/ets/ani/connection/src/connection_ani.cpp +++ b/frameworks/ets/ani/connection/src/connection_ani.cpp @@ -78,7 +78,7 @@ void throwBusinessError(ani_env *env, int32_t code, std::string &msg) env->Object_New(errorcls, ctor, &errorObj, errorMsg); ani_object businessErrorObj; - env->Object_New(businessError, businessErrorCtor, &businessErrorObj, errorObj); + env->Object_New(businessError, businessErrorCtor, &businessErrorObj, ani_double(code), errorObj); env->ThrowError(static_cast(businessErrorObj)); }