Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Hide a File and disable "Show hidden files" - Disable UAC

You shouldn't wrap your whole code (especially on releases) with Try Catch.
Thw reason i'm saying this, is because the first block it could never throw an error.

It's nice to know the second block of code, tho i never searched for it or needed it, seems kinda useful to know such things are so easy to change.
(Nov 9, 2014 03:59 PM)imi-tat0r Wrote:  Well I wasn't to sure about the code being able to fail.

you can always check msdn, in this case http://msdn.microsoft.com/en-us/library/...10%29.aspx

(Nov 9, 2014 03:59 PM)imi-tat0r Wrote:  So yeah actually I am only using try-catch to prevent any errors regardless if they can/will appear or not.

That doesn't quite make sense, if they can't appear, why use Try Catch then? There isn't any random error that might me thrown just because the framework doesn't give a fuck anymore-.. lol.
(Nov 9, 2014 10:57 PM)Menalix Wrote:  that's also totally fine, you should use try catch whereever you can so you won't mess up the Windows Event Logs with unhandled errors.

Wtf? Is that saying: "You should wrap your .exe with Try Catch?
After reading your usertitle, i giggled.
(Nov 10, 2014 09:32 AM)imi-tat0r Wrote:  Better safe than sorry my friend :)
And trust me Menalix knows his stuff.

Hexui is the best proof ;)

Are you fucking stupid? Or you just can't code at all?
Why the fuck there would be an error thrown in a code that isn't supposed to throw any?

That's bad design, bad practice, bad programming in general, if you want to do error handling, that's fine, not fucking handle every shit that gets thrown, what happens if an "OutOfMemoryException" is thrown and you blindly catch it in your magic catch blocks?
Then your stuck debugging your crappy application and trying to reproduce it, which you would fail and waste your time.
Lol, you didn't even replied to anything i said, you got no answer, why quote?

The talk of one who doesn't understand shit.

And by the way, what does Messagebox.Show(ex.ToString) have anything to do with anything?
On release mode, when your program gets finally used, you ask the costumer, what was the error thrown ? And he would say, i can't remember, then what do you do?

This is a forum, not a chat, i don't give a fuck how you code, i only care of the people that might see this and follow your example.
(Nov 10, 2014 06:21 PM)Menalix Wrote:  It's better practise to have the code filled with Try Catch'es even some are placed cluesless, than not having a single one

Oh it is? I'm sorry, i'll ask for your opinion next time i open VS.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by nicodemoNov 23, 2019 10:30 AM 4 190 Nov 23, 2019 10:30 AM
Last Post: realsunjester
[C] by Tr0jandogOct 11, 2019 08:32 PM 1 204 Oct 11, 2019 08:32 PM
Last Post: stderr
[Shell] by LibSep 12, 2019 06:46 PM 3 698 Sep 12, 2019 06:46 PM
Last Post: PwnedLevel1000