generated from mwc/lab_server
Completed checkpoint 2 of the server lab.
This commit is contained in:
parent
a836a76735
commit
81aa6bdd4b
4
notes.md
4
notes.md
|
@ -24,10 +24,10 @@ I would imagine if the server were setup for me as this one was that it could ab
|
|||
program's behavior. Describe a few routes which you think may exist for your
|
||||
chosen program's backend server.
|
||||
|
||||
|
||||
With google docs, I assume every time something is typed the location of the character typed as well as what was typed is posted as a change to the document on the server, so a route might be "change." Given that google docs allows for near-real-time remote collaboration, google docs likely gets the document extraordinarily frequently to make it appear that changes happen nearly instantly, so a route might be "show." Such a route might also simultaneously check if the user has access, as a user whose access is removed can no longer view or edit the document.
|
||||
|
||||
4. In your own words, what is an exception? When might it be useful to handle an
|
||||
exception? When is it better not to handle an exception, and instead let the
|
||||
program crash?
|
||||
|
||||
|
||||
An exception is when something unintended happens that would crash a program. It could be useful to handle an exception if it's something that could plausibly happen. Handling the exception provides the opportunity to provide a tailored message to the user to explain what it is that caused the program not to function as expected, especially in the case where they try to access something they're not supposed to or doesn't exist. It could be better not to handle an exception as allowing the program to crash could indicate more work needs to be done to fix the program itself. Putting it in an exception could hide the presence of some program-breaking underlying issue.
|
||||
|
|
Loading…
Reference in New Issue