|
Please! Never ever spoke to me again! Filthy VB lover...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Didn't think you acknowledged vb
|
|
|
|
|
It is disgusting, just like
try {
} catch (Exception ex) { }
veni bibi saltavi
|
|
|
|
|
It's worse than that! It's like:
try {
} catch (Exception ex) { }
try {
} catch (Exception ex) { }
try {
} catch (Exception ex) { }
try {
} catch (Exception ex) { }
try {
} catch (Exception ex) { }
try {
} catch (Exception ex) { }
try {
} catch (Exception ex) { }
... repeated 8000 times...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I once saw:
On Error Goto ErrorHandler
ErrorHandler:
MsgBox err
resume
veni bibi saltavi
|
|
|
|
|
I saw it and my first advice was to remove it. Then to improve the code :p
Unfortunately, no, its not dead, there are still VB6 programmers - I'm currently working on a project that was written by VB6 turned VB.NET programmer and I'm still refactoring whenever I get the chance.
I have DAL interface with all data access methods defined in there...and I don't have time to split it so I continue adding to it when changing existing code. It is at 300+ methods right now. With two concrete classes implementing it.
|
|
|
|
|
I know an old VB dinosaur who does it almost right...
Try
Dim sCode As String = 123
Dim Id As Integer
Dim someOtherVar As String
Catch (ex As Excpetion)
Log(Err.Message)
End Try I used to see this pre-.NET VB mixed with VB.NET a lot
|
|
|
|
|
Ah, you would love Rx then, there is something called Retry there
Click and cry[^]
|
|
|
|
|
Retry actually makes sense: sometimes you have to wait for something to "wake up" so doing it three times before failing isn't a bad idea.
Be a nice addon to C#:
retry (3)
{
MyOperation();
}
catch (Exception ex)
{
...
} Or even just
try (3)
{
MyOperation();
}
catch (Exception ex)
{
...
}
Mind you, it'd also be nice to have try with a timespan timeout which caused a catch sometimes.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I think you can with Rx, but It will involve some nasty code.
If you look in the link I posted you can retry infinitely many times:
public static void RetrySample<T>(IObservable<T> source)
{
source.Retry().Subscribe(t=>Console.WriteLine(t));
Console.ReadKey();
}
So all you have to do is to enclose the subscription in an Observer, and set a timerinterval for desubscription by using an IObserver class.
|
|
|
|
|
OriginalGriff wrote: Why isn't this abortion dead? When you have a function that calls an external process and you don't care if it generates an error or not, then it works great. If it does generate an error it's an external process and nothing you can do about it and you still want the rest of your code to run.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
There was a "question" back in April which was basically a rant about how C# sucked because it didn't have this "feature".
The OP was insistent that his code was perfect, and he just wanted to ignore Microsoft's errors.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Richard Deeming wrote: The OP was insistent that his code was perfect, and he just wanted to ignore Microsoft's errors. You know, sometimes natural selection is just too damned slow.
Software Zen: delete this;
|
|
|
|
|
The worst part of this is that I find a whole bunch of vendors that do this crap, too! I deal with Dynamics GP, where customizations can be written in VBA. I had a major error in one window where it kept dumping the user into VBA, bypassing all security. I contacted the vendor, and (sort of politely) requested they get their **** together. They sent me updated code... First line?
On error resume next
I lost it! They were confused why we changed vendors within a week after that...
|
|
|
|
|
I used it once, in a mini-prog that just creates empty, numbered ZIP or RAR files.
The code was so simple that any potential "real" errors were dealt with without hardly having to think about them, so the only thing to worry about was if someone tried to create files with the same filenames as existing file (which I'd set to fail).
It simply wasn't worth the effort of catching the error, so I just let it happen and Resumed Next.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
From PompeyThree, who can't be with us today:
"Seagull Soars for pastry snack" (7,5)
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Sausage Rolls
Anagram of seagull soars.
Andy B
|
|
|
|
|
And you are up tomorrow!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Oh, right. I really couldn't see how Cornish Pasty worked!
I am not a number. I am a ... no, wait!
|
|
|
|
|
OriginalGriff wrote: PompeyThree, who can't be with us today
I am sorry for your loss.
... such stuff as dreams are made on
|
|
|
|
|
I think he's off visiting his big hole in the ground full of cash...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
It is a relief to hear he is not in the hole yet!
... such stuff as dreams are made on
|
|
|
|
|
I'm amazed it's not (3,5,3) again!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
Did Microsoft inject a bug into Skype, or did I screw up a setting ?
The "Away" status no longer works on my copy of skype.
I am either present, online (green dot) or I am Unavailable (red dot) and won't see any calls which come in while I am away from my desk.
If I click on "Away" (the mustard colored dot) I don't get "away" as a status, but instead, skype goes into "Unavailable" (red dot) status.
I tried setting the timeout status to show me "away" after two minutes; same thing. When the timeout hits, I am not shown as "away" (mustard colored dot) but instead as "unavailable" (red dot).
This "New Skype Experience" began today. Had no problems before.
Oh, another weird one: if I have a voice conversation with someone, I go into red dot status again.
Is anyone else experiencing this behavior ?
|
|
|
|