10-02-2018, 03:10 AM
One wouldn't expect fred would be the accepted data in place of an integer. I used that as a substitute. More likely, the value of 'nil' could be accidentally passed into the method, and the more likely means to create an error.
While you say that some non-web-based programmers were taught to raise an error, others were taught to put safeguards in place to prevent them from occurring. One should merely ensure illegal data doesn't allow the method or function to break the software.
Some should take heed to ensure that such safeguards were put into place. While you suggest the use of raise within the software to report an error, I would suggest that the software be written with safeguards to prevent the errors from even appearing. I am witness to such crashes within the past few months because of a lack of safeguards.
While you say that some non-web-based programmers were taught to raise an error, others were taught to put safeguards in place to prevent them from occurring. One should merely ensure illegal data doesn't allow the method or function to break the software.
Some should take heed to ensure that such safeguards were put into place. While you suggest the use of raise within the software to report an error, I would suggest that the software be written with safeguards to prevent the errors from even appearing. I am witness to such crashes within the past few months because of a lack of safeguards.