Sign In | Subscribe

Enter your Sign on user name and password.

Forgot password?
  • Follow us on:
Start learning today, and be successful in your academic & professional career. Start Today!
Loading video...
This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of JavaScript
  • Discussion

  • Study Guides

  • Download Lecture Slides

  • Table of Contents

  • Related Services

Start Learning Now

Our free lessons will get you started (Adobe Flash® required).
Get immediate access to our entire library.

Sign up for

Membership Overview

  • Unlimited access to our entire library of courses.
  • Search and jump to exactly what you want to learn.
  • *Ask questions and get answers from the community and our teachers!
  • Practice questions with step-by-step solutions.
  • Download lesson files for programming and software training practice.
  • Track your course viewing progress.
  • Download lecture slides for taking notes.
  • Learn at your own pace... anytime, anywhere!

Error Handling

  • An error that arises through mistakes in coding or through incorrect data that is entered by the user is called an “exception”
  • Such errors that are encountered while a program runs are said to be “thrown”
  • Programmers try to anticipate these errors and either prevent them or solve them before they happen
  • Java uses the “Try... Catch...” process in order to try running a block of code to test for errors and then catch an error if it occurs

Error Handling

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

  • Intro 0:00
  • Using Try..Catch to Detect Errors 0:09
    • What is Handling Errors?
    • Try..Catch Syntax
  • Throwing Exceptions 2:13
    • Throw Statement Syntax
  • Special Text Characters 2:57
    • Special Text Characters
  • Example 1: Try...Catch 4:51
  • Example 2: Try…Catch Correction 8:32
  • Example 3: Try…Catch Redirection 10:53
  • Example 4: Try Catch Throw 12:14
  • Example 5: Throwing Errors 18:24
  • Example 6: Special Characters Error 19:51
  • Example 7: Special Text Characters 20:38