简体   繁体   中英

If you have more than 1 error in your ruby on rails script, how does it know which one do display?

I often write some code, then get an error, change it, and see a different error. Does this mean that the first error is fixed and that I only have a new error because of what I just changed? or just that this new error is more "pressing" than the first? How can I find out?

It could be both. Most times when you fix the first error you should just be seeing a notice for the error that follows. However, if your fix was not correct or was messing with previous snippets, you could be causing errors out of the blue.

That is why techniques like testing are important. If such logic errors occur, your test suite is there to save the day.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM