Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解决使用异常,类找不到,开发不便利的问题 #90

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jorry2008
Copy link

解决使用异常,类找不到,开发不便利的问题

从laravel拓展的开发角度看,采用config.php,命名,即没有体现出oss拓展包的含义,又占用了一个config通用关键词,非常容易引起误解
Log引入路径错误,然后获取文件那里异常直接抛出,非常不利于开发,这并不是一个致命的错误,
实际开发场景中,经常会去读一个不存在的文件,比如:系统配置里面,做系统迁移,数据库记录文件的数据并不存在,
前提是得保证系统运行下去,而不是因为一个非系统耦合的文件找不到导致整个系统奔溃,
如果非要这么做的话,把config(‘oss.debug’)引入进来也是可以了,
为了简便开发,这里记录一个警告日志足够了!
删除资源是正常操作,但如果能明确资源并不存在,那么直接返回不存在,删除操作就不执行,这样才比较合理,
文件本来就不存在,直接抛出异常,程序又奔溃了
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant