Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 821711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:41:05+00:00 2026-05-15T02:41:05+00:00

Does try … catch(e) provide the same service as On Error Resume Next in

  • 0

Does try ... catch(e) provide the same service as On Error Resume Next in VB?

I have a page which uses several JQuery plugins as well as some functions I have written myself. It would take a lot of work to address all possible exceptions.

For now, I want to tell the script not to break on would be fatal errors. How do I do that when I’m using plugins?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T02:41:06+00:00Added an answer on May 15, 2026 at 2:41 am

    Yes, try/catch provides a way to capture errors, though unlike On Error Resume Next you choose to deal with the error in the catch block or not at all.

    So in VB you might have done:

    on error resume next
    DoSomethingUnsavory
    if err.number <> 0 then ...
    on error goto 0 ' you DO do this, right?
    

    In JS you’d do the following:

    try {
        doSomethingUnsavory();
    }
    catch (e) {
        // handle the unsavoriness if needed
    }
    

    Of course empty catch blocks are evil so don’t leave them in production code yadda yadda. The best thing is to let the errors occur and fix them. Fail fast!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How much longer (in nanoseconds) does a try-catch take when catching an exception rather
does try/catch affects performance if no exception thrown in try block? how about try/catch/finally
I have a Silverlight UserControl which uses the ContentPropertyAttribute to exposes the Children property
I have an application which does not read ANY files from the local disk
What does try do in java?
Does anybody try zf2? I can not understand new mechanism of using sessions in
Does anybody try used MvcScaffolding/T4Scaffolding with Visual Studio 11 beta and Windows 8 Customer
Consider the code below. I don't understand why my GCC compiler does not try
What does it mean when you try to push to a Mercurial repository on
I try to use new Function() in a calculator and I find it does

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.