implement a way to catch any potential exceptions thrown while validating a movieId.
If anyone has finished this ticket , please share the logic .
It is against the policies for these forums to share answers directly regarding the labs or exams.
If you want to catch an exception in NodeJS you can use a try / catch block, you can find more details on this page about using this approach to catch exceptions:
Kindest regards,
Eoin
@brazileoin I am not asking for the answer, i am just asking the approach. this ticket is for m220Java developer
Apologies for the NodeJS link, both it and Java use the same semantics of try / catch, you can find details on this page for Java:
https://www.w3schools.com/java/java_try_catch.asp
Kindest regards,
Eoin
In addition, the TODOs in all the files named in the task description looks like:
// TODO> Ticket - Handling Errors: Implement a try catch block to
// handle a potential write exception when given a wrong commentId.
I really don’t know how someone can help without writing the code.
@steevej-1495 I am sorry if you didn’t understand my query, but I think there is only one ticket in error handling which says validate movieID.
Thanks & Regards
Prashant