security: Improve with more specific error core and log of it
This improvement has been suggested by Randeep Singh at :
https://gerrit.iotivity.org/gerrit/#/c/9521/
Also reducing presence of "goto:" is always welcome ;)
Change-Id: I2ca21c37105c530c92e2cfd4b6ae9e3cfbc06231
Origin: https://gerrit.iotivity.org/gerrit/#/c/9543/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/9543
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>