Subscribe to Error and a half        RSS Feed

Errors, errors everywhere.

Icon Leave Comment
One of my biggest worries whilst programming is getting an error. I hate errors. With a passion. I want to destroy them with the power and intensity of a thousand suns. They suck.

Handling an error is never fun. You don't like doing it, and if you think you do, you're wrong. Errors are the worst thing that can possibly happen to you program. There are a few types of errors and I've come up with a little shitlist of errors I hate.

3. Build errors:

Build errors are by far the easiest to fix, though they can be a big pain in the ass, especially if you fix one error, and another one pops up on another part of your code. I am happy, though, that most IDEs have integrated a help system to let you know when you've made a syntax error or whatever will cause your program to not build.

2. Errors on the page:

PHP is rather notorious for being an erroneous bitch. You don't catch the error until you go into the page,a dn then you have to hunt for it. Though if you're using a decent IDE (Dreamweaver, Notepad++) you can just hop to the line where the error is, it will still take a while to fix. And, just as in #3, you may break your page by fixing it.

For example:

Warning: Cannot modify header information - headers already sent by (output started at /home/u/public_html/x/settings.php:169) in /home/u/public_html/x/functions.php on line 1910"

My error is on line 1910. 1910!!! Some may say this is because I don't seperate my code, but if I do, then I'll have to hunt through multiple PHP files to find out where the error originated.

1. Crash!

These kinds of errors are the worst. Especially when you've already released your program. No one likes a program that doesn't work. Especially people that have paid for your work.

Posted Image
I am dissapoint.

Definitely avoid errors.

The best way to do so is to insert error handling functions into your code or debug your program. (in my opinion). These are definite life savers.

For example, I have some error handling code in my Application Launcher:
    Private Sub Process()
            Select Case CheckedState
                Case Check.Firefox
                Case Check.Notepad
                Case Check.Filezilla
                Case Check.uTorrent
                Case Check.Photoshop
                Case Check.Pidgin
                Case Check.bb4_win
                Case Check.DevCpp
                Case Check.GoogleChrome
                Case Check.sevenzip
                Case Check.Opera
                Case Check.Dreamweaver
            End Select
        Catch ex As Exception
            MessageBox.Show(CheckedState.ToString + " - Application could not be found!", "Couldn't Locate Application", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
        End Try
    End Sub

Now, if for some reason my application cannot find the EXE file it's supposed to be running, a little pop up window come up telling me that it cannot be found.

If I had not inserted this, my application would've done this:
Posted Image

I would've either gotten the option to continue running my program, without opening the one I chose, or I would've had to quit. Not something I want to do.

How do you avoid errors in your programs?

0 Comments On This Entry


Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry

June 2020

 1 2 3456

Recent Entries

Recent Comments

Search My Blog

0 user(s) viewing

0 Guests
0 member(s)
0 anonymous member(s)