From 92c739465807e5b9ed3b1447bf17e370402285ba Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Fri, 9 Feb 2018 04:27:31 +0000 Subject: [PATCH] added some error messsages --- moo/lib/moo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moo/lib/moo.c b/moo/lib/moo.c index 563736e..f92bd1c 100644 --- a/moo/lib/moo.c +++ b/moo/lib/moo.c @@ -649,7 +649,7 @@ int moo_importmod (moo_t* moo, moo_oop_class_t _class, const moo_ooch_t* name, m MOO_ASSERT (moo, mdp != MOO_NULL); MOO_DEBUG1 (moo, "Cannot import module [%js] - already active\n", mdp->mod.name); - moo_seterrnum (moo, MOO_EPERM); + moo_seterrbfmt (moo, MOO_EPERM, "unable to import module [%js] - already active", mdp->mod.name); goto done2; } @@ -659,7 +659,7 @@ int moo_importmod (moo_t* moo, moo_oop_class_t _class, const moo_ooch_t* name, m if (!mdp->mod.import) { MOO_DEBUG1 (moo, "Cannot import module [%js] - importing not supported by the module\n", mdp->mod.name); - moo_seterrnum (moo, MOO_ENOIMPL); + moo_seterrbfmt (moo, MOO_ENOIMPL, "unable to import module [%js] - not supported by the module", mdp->mod.name); goto done; }