Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

On Error GoTo label

This is a discussion on On Error GoTo label within the Scripting forums, part of the Web Development category; Hi all, i was trying to implement error handling functions in my project with “on error” statement. There is no “on error goto <label>” statement in vbscript. There is only ...

Go Back   Geeks Talk > Web Development > Scripting
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

Scripting Discuss Issues and Problems related to VB Script, Java Script and other Client Side Scripting

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-15-2008
Expert Member
 
Join Date: Nov 2006
Location: Hyd-IND
Posts: 528
Thanks: 1
Thanked 63 Times in 50 Posts
sutnarcha is on a distinguished road
On Error GoTo label

Hi all, i was trying to implement error handling functions in my project with “on error” statement. There is no “on error goto <label>” statement in vbscript. There is only “on error resume next” and “on error goto 0”. So, i came-up with the following solution.
Quote:
function abc() on error resume next function statement 1 function statement 2 function statement 3 if err.number<>0 then error handling statements end if end function abc
but here, the problem if the error occurs at function statement 1, it will still execute statement 2 & 3 and only then error handler statements will be executed. This is because there is “on error resume next” statement given above. However, if we remove the “on error resume next statement”, the error handler statements will never be executed. Is there a replacement for on error goto <label> in vbscript? i just couldn’t introduce the logic with the available on error statements in vbscript.
__________________
Lack of WILL POWER has caused more failure than
lack of INTELLIGENCE or ABILITY.

-sutnarcha-
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-15-2008
Expert Member
 
Join Date: Nov 2006
Location: Hyd-IND
Posts: 528
Thanks: 1
Thanked 63 Times in 50 Posts
sutnarcha is on a distinguished road
Re: On Error GoTo label

Hi Moderator,

Please delete this thread. I created a new one for this.
__________________
Lack of WILL POWER has caused more failure than
lack of INTELLIGENCE or ABILITY.

-sutnarcha-
Reply With Quote
  #3 (permalink)  
Old 08-06-2009
Junior Member
 
Join Date: Aug 2009
Location: india
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Deepcool is on a distinguished road
Smile Re: On Error GoTo label

Quote:
Originally Posted by sutnarcha View Post
Hi all, i was trying to implement error handling functions in my project with “on error” statement. There is no “on error goto <label>” statement in vbscript. There is only “on error resume next” and “on error goto 0”. So, i came-up with the following solution. but here, the problem if the error occurs at function statement 1, it will still execute statement 2 & 3 and only then error handler statements will be executed. This is because there is “on error resume next” statement given above. However, if we remove the “on error resume next statement”, the error handler statements will never be executed. Is there a replacement for on error goto <label> in vbscript? i just couldn’t introduce the logic with the available on error statements in vbscript.
Hi...
Did u got any soluton to this Porb...if so Can you please let me know as i am also stuck on same issue
Reply With Quote
Reply

  Geeks Talk > Web Development > Scripting

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
disk label aladin62 Unix/Linux 2 11-27-2008 09:33 PM
Code for goto next page vamshiarige VB.NET 2 04-17-2008 03:04 AM
CD Label Designer - easy to use CD/DVD label maker JobHelper Geeks Lounge 0 11-11-2007 01:11 PM
Hide ORACLE label in menu bar Geek_Guest Oracle Apps 0 09-28-2007 07:18 PM
dynamic checkbox and label... psuresh1982 JavaScript 0 07-09-2007 04:28 AM


All times are GMT -4. The time now is 02:43 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved