It won't take no for an answer
-
Just found this:
private void trySave(ref clsWord objWord, string strFullPath, Format format) { try { objWord.save(strFullPath, format); } catch (InvalidOperationException ex) { if (ex != null) { trySave(ref objWord, strFullPath, format); } } }
-
Just found this:
private void trySave(ref clsWord objWord, string strFullPath, Format format) { try { objWord.save(strFullPath, format); } catch (InvalidOperationException ex) { if (ex != null) { trySave(ref objWord, strFullPath, format); } } }
Quote William Edward Hickson[^]:
'Tis a lesson you should heed: Try, try, try again. If at first you don't succeed, Try, try, try again.
-
Quote William Edward Hickson[^]:
'Tis a lesson you should heed: Try, try, try again. If at first you don't succeed, Try, try, try again.
Yeah, but your version stops after three goes... :laugh:
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
-
Just found this:
private void trySave(ref clsWord objWord, string strFullPath, Format format) { try { objWord.save(strFullPath, format); } catch (InvalidOperationException ex) { if (ex != null) { trySave(ref objWord, strFullPath, format); } } }
-
Just found this:
private void trySave(ref clsWord objWord, string strFullPath, Format format) { try { objWord.save(strFullPath, format); } catch (InvalidOperationException ex) { if (ex != null) { trySave(ref objWord, strFullPath, format); } } }
Well, eventually it will, but detrimentously: the StackOverflowException won't be dealt with at this place.
-
For a moment I thought about that, but then I just gave up
try
ing. -
I think he got
NullReferenceException
so added that condition to avoid the errorthatraja
Code converters | Education Needed No thanks, I am all stocked up. - Luc Pattyn When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
-
Just found this:
private void trySave(ref clsWord objWord, string strFullPath, Format format) { try { objWord.save(strFullPath, format); } catch (InvalidOperationException ex) { if (ex != null) { trySave(ref objWord, strFullPath, format); } } }
The code is complete bullshit!
-
What is the point of using ref?
objWord
is not assigned any value. I guess, the author has never heard of reference types and value types, doesn't differentiate them and also is a former C++ developer. -
If an exception is generated, a variable, representing it, can NEVER be
null
. And the checkex != null
just looks stupid.
-
Also, it will sound very upsetting for the author, but if the exception mentioned above is ever generated, he is about to face an infinite recursion, hence he will also face the full power of the
StackOverflowException
.
Summarizing the above, I'd say he better work in McDonald's. To get a chance to become a manager :rolleyes:, that is a real chance to afford Ford Mustang GT... someday :-\ .
lifecycle of a lifecycle of a lifecycle
-
-
The code is complete bullshit!
-
What is the point of using ref?
objWord
is not assigned any value. I guess, the author has never heard of reference types and value types, doesn't differentiate them and also is a former C++ developer. -
If an exception is generated, a variable, representing it, can NEVER be
null
. And the checkex != null
just looks stupid.
-
Also, it will sound very upsetting for the author, but if the exception mentioned above is ever generated, he is about to face an infinite recursion, hence he will also face the full power of the
StackOverflowException
.
Summarizing the above, I'd say he better work in McDonald's. To get a chance to become a manager :rolleyes:, that is a real chance to afford Ford Mustang GT... someday :-\ .
lifecycle of a lifecycle of a lifecycle
Lol. Btw, to add some background, I'm a contractor at a company that bought another company in the same business. A very successfull software came in the bundle (and of course they plan to merge its features into their own software), but little to no documentation came along and now people are having a hard time figuring bugs things out. It is BS at so many levels, indeed, but the other products make up for it.
-
-
Just found this:
private void trySave(ref clsWord objWord, string strFullPath, Format format) { try { objWord.save(strFullPath, format); } catch (InvalidOperationException ex) { if (ex != null) { trySave(ref objWord, strFullPath, format); } } }
-
Just found this:
private void trySave(ref clsWord objWord, string strFullPath, Format format) { try { objWord.save(strFullPath, format); } catch (InvalidOperationException ex) { if (ex != null) { trySave(ref objWord, strFullPath, format); } } }
:doh:
<voice type="Ebeneezer Scrooge"> Bah. dumb bugs </voice>