CodeIgniter模型调试错误
我是 CodeIgniter 的新手,我需要一种方法来获取更有意义的错误消息。具体来说,我在某些模型关系方面遇到了麻烦,但错误很模糊。我愿意尝试/安装任何东西,因为我不知道如何修复这种关系。
有没有办法指定错误消息的详细程度?另外,这可能与 DataMapper 有关,但我不能告诉。我不在乎它们是否已登录或在浏览器中。
在我的浏览器中,错误显示:
An Error Was Encountered
Unable to relate X with Y.
任何更多信息都会很棒...哪个类、行号、堆栈跟踪。增加日志阈值没有帮助。
I am new to CodeIgniter, and I need a way to get more meaningful error messages. Specifically I am having trouble with some model relationships, but the error is vague. I am willing to try/install anything since I dont know how to fix this relationship.
Is there a way to specify how verbose an error message is? Also, this could be related to DataMapper, but I cant tell. I dont care if they are logged or in the browser.
In my browser error reads:
An Error Was Encountered
Unable to relate X with Y.
Any more info would be great... which class, line number, a stacktrace. Increasing the log threshold did not help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是数据映射器错误消息。
看起来您正在从 X 请求关联条目并引用 Y。很可能您没有正确定义两个表之间的关系。请记住,您必须定义两个模型的关系(通常是一个“has_many”和一个“has_one”)。
This is a datamapper error message.
It looks like you are requesting the assocaites entries from X with a reference to Y. It is most likely that you have not properly defined the relationships between the two tables. Remember that you have to define the relationship for both models (most often one 'has_many' and one 'has_one').