new factory
added error_code to config.php
using instead
update return error
Merge pull request #1 from Awesomez/master

工厂和错误代码的一点改动