AuthorMessage
dzadzuks
Ametuar
Posts: 135

im makeing a web browser...
to go BACK i use this>  Web.GoBack
but when i have no way to go back it showe error and crashes!
how can i handle that error?  :(   
i tryed to make a msgbox on that error but nothing worked :/
Meka][Meka
Unstopable
Posts: 700

on error resume next < can possibly ignore it, if not u can always do
Code:

private sub your_sub()
    on error goto err
    'do stuff here
    exit sub
err:
     'handle error here, maybe write it to a log :)
end sub

nikini
Clone
Posts: 7

That's kind of stupid..
Just use
Code:
On Error Resume Next

Trust me!!! It works..
Meka][Meka
Unstopable
Posts: 700

Quoted from nikini
That's kind of stupid..
Just use
Code:
On Error Resume Next

Trust me!!! It works..

its not stupid this is the correct way to handle an error, to use on resume next is stupid... its not being handled, and can cause abnormal program issues, especially with larger software, and read above, i already stated that....
ps: on error resume next cannot log the errors and do other misc procedures with the error....
nikini
Clone
Posts: 7

Yes.. but handling such an easy error would be stupid... i mean this error should just be passed over..
Meka][Meka
Unstopable
Posts: 700

Quoted from nikini
Yes.. but handling such an easy error would be stupid... i mean this error should just be passed over..

no handling such an error wud not be stupid, its a smart way of adding something such as an error, 'No Previous Page Found'
or letting u know the back button shudnt be enabled yet, your apps must be crap, full of bugs, crash due to small bugs...a,d be difficult to debug
i conquered vb, many years ago, i've done vb.net, c#, c++, delphi, lua scripting, and loads of others, let me know how many progging languages u know, and how much experience with security, bugs, and exploits you have, then we'll talk about wether u can call it stupid ;)
Meka][Meka
Unstopable
Posts: 700

example of your bad coding
default :
Code:

Private Function GoBack() As Boolean
   dim page as string
   page = GetLastPage() 'oh shit its stopped with an error.... 8-)
   Call AddToCollection(page)
   GoBack = True
End Function

Your way:
Code:

Private Function GoBack() As Boolean
   dim page as string
   on error resume next
   page = GetLastPage() 'this would be an error....
   Call AddToCollection(page) ' oh look, its really another error, just your wasting cpu, and mem messing up vb
   GoBack = True 'you returned true but yet u never actually went back a page :-O
End Function

My Way:
Code:

Private Function GoBack() As Boolean
   dim page as string
   on error goto err
   page = GetLastPage() 'oops we're going to err :)
   Call AddToCollection(page) 'skipped
   GoBack = True
   Exit Function
err:
   Call LogError("disable back button if ther is no existant page b4 u recompile")
   GoBack = False
End Function

now tell me which is more sensible way, which is now 'stupid', do u even know anything about VB ?
dzadzuks
Ametuar
Posts: 135

im using mekas code coz it handle errors much better.. the resume next shit is crap..
nikini
Clone
Posts: 7

i know flash, asp, php, basic, delphi, foxpro, sql, xml! At these I'm almost an expert or a supreme being (i master flash for ex). And i also know (medium or low) pearl and some dumb programming language made by a guy from NASA!
I think i have quite some error handling experience.. don't you??? And I'm only 18, Imagine what i will know later..
Meka][Meka
Unstopable
Posts: 700

Quoted from nikini
i know flash, asp, php, basic, delphi, foxpro, sql, xml! At these I'm almost an expert or a supreme being (i master flash for ex). And i also know (medium or low) pearl and some dumb programming language made by a guy from NASA!
I think i have quite some error handling experience.. don't you??? And I'm only 18, Imagine what i will know later..

mostly weblanguages, u dont wanna know my age, xml is not programming, php, asp, flash, foxpro, sql do not compile into an exe, these are not true programming langauges....no i dont think u have enough experience with error handling = 'on error resume next'  is NOT error 'handling'
NeiSep
Ametuar
Posts: 93

i can say that i think php asp is programing lang but not in that what you mean meka][meka
i think php and asp is web programing and that different to software programing hehe.
But anyway XML and SQL is both database atleast SQL is database.
and XML is a new way to store stuff hehe.
And Flash is also a web programing lang and Basic is to easy lol.
Delphi is the only lang that you can say is a real software lang that you talking about hehe
Anyway dont forget to have a nice day
vickmaker
Ametuar
Posts: 127

NIKINI, 
you made an error mate just admit it, lol
so you say you know this n that, but you dont know VB very well, thats a fact. and facts historically remain the same, hence why they are facts!! lol
ya cheeky person, argue with meka and u will lose regardless of how RIGHT you THINK you are
looooooool
chill
-\\v
oh and the point!! as said b4
Code:
on error resume next
is like
Code:
on broken arm screamloud

as a pose to
 
Code:
on broken arm goto screamloud
screamloud = "go to hospital asap"

 
Meka][Meka
Unstopable
Posts: 700

Quoted from vî¢KMåkè®
NIKINI, 
you made an error mate just admit it, lol
so you say you know this n that, but you dont know VB very well, thats a fact. and facts historically remain the same, hence why they are facts!! lol
ya cheeky bastard, argue with meka and u will lose regardless of how RIGHT you THINK you are
looooooool
chill
-\\v

looooooooool, nice speech, hey yo gimme your sig and i'll host it...doesnt seem to be working....
vickmaker
Ametuar
Posts: 127

  in sigs area
you back in hubs yet br0, need to check 
hmmmz, its too big, lol, imageshack has dumped it ill re-up it there ty though.
-\\v
C0D3Z3R0
Pro
Posts: 166

can we try keep to the point of the topic instead of making this person feel bad? i doubt he will come back and anyone else if this is the way anyone yous don't know is treated
Meka][Meka
Unstopable
Posts: 700

true, but this aint about making him feel bad....he was big headed nevertheless, he thought he new right, no matter on my reply, i give explanations, he still.....now, i dont respect ppl attempting to teach people in the forum, code that is crap....and trying to prove false over fact
i dont disagree with his opinions, if he wants to code like that, then fine, but no teaching other people in here his bad coding skills, i also dont mind him replying, if he queried, rather then try factorize his reply...
Mickey
Ametuar
Posts: 115

I agree with Meka
dzadzuks
Ametuar
Posts: 135

Yes.. Meka is 100% right..
P.S all things are around my post.. cool