Computer Science > DISCUSSION POST > Stanford University - CS 1103CS 1103 - AY2020-T2_ Assignment 1_Discussion Forum (All)
Discussion Forum Unit 1 Assignment 1 Subscribe HOME CONTACT US RESOURCES LINKS FACULTY MY COURSES MENU CS 1103 Programming 2 - Term 2, 2019-2020 Search forums Assignmen ... t 1 by Eric Goh (Instructor) - Thursday, 14 November 2019, 1:09 PM Who should be responsible for catching and handling exceptions: the computer or the computer program? 15 words Permalink | Reply Re: Assignment 1 by Randall Kruse - Friday, 15 November 2019, 10:54 AM The computer program deÕnes how an exception is caught and handled. An exception handling process is expressed programmatically:/ public AuthenticationResult authenticate(Credentials credentials) throws IOException { try { GetAuthenticationTokenResult result = customerRestService.getAuthenticationToken(cre dentials); return new AuthenticationResult(AuthenticationResult.SUCCESS, result.getToken()); } catch (AuthenticationFailedException ex) { // credentials failed - log and return an auth failure code LOG.error(ex); return new AuthenticationResult(ex.getResultCode()); } } I'm not quite sure how to interpret the alternative proposition, that the computer would handle the exception. The program has the context necessary to deal with the error, whereas an exceptional condition at a lower level than the application layer is more or less just going to be a car wreck [Show More]
Last updated: 3 years ago
Preview 1 out of 40 pages
Buy this document to get the full access instantly
Instant Download Access after purchase
Buy NowInstant download
We Accept:
Can't find what you want? Try our AI powered Search
Connected school, study & course
About the document
Uploaded On
Apr 10, 2021
Number of pages
40
Written in
All
This document has been written for:
Uploaded
Apr 10, 2021
Downloads
0
Views
180
Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.
We're available through e-mail, Twitter, Facebook, and live chat.
FAQ
Questions? Leave a message!
Copyright © Scholarfriends · High quality services·