improve error_code and ERROR_LOG

Signed-off-by: Jack <jack.wgm@gmail.com>