Sunday, 2 February 2014

Exceptions and raising errors

My work in computer science over the past week made me much more familiar with Exceptions and raising error messages, due to the lecture material, the class exercise, and the lab. Prior to this, I did not have any experience with these things, and so this experience opened my eyes. The irony of course was that, even though this was an entirely new thing to me, I found that I was able to grasp most of the concepts rather quickly, thanks to the slides and other links posted on the class site. I actually found it rather fun to work with the different errors and error messages, as they provided and interesting look into some of the most crucial construction blocks of a good bit of programming.
I did, however, have a short moment of difficulty when attempting to use the "try" method. At first, I was unaware of how the "except" part of "try" worked, and so I would simply "try" a method, without implementing an "except". Of course this created some errors, and it took me a little while of searching the sources provided to finally grasp why the errors were showing up, and why "except" was needed. After learning that it was needed though, and that it worked sort of like an "if" statement in terms of its construction, I was able to use it properly, and finish the code that I was working on.    

No comments:

Post a Comment