Types of errors

When code does not operate or compile successfully we say that the code has a bug in it. Essentially any form of error is considered a bug and the term is used as a generic blanket. However it is important to understand that not all bugs are the same. They come in different categories and different severities. For example a bug where some text in your program has a spelling mistake would be considered a low pririoty bug while a security bug would be considered a high bug. Software companies will always address high priority bugs first and then work on the lower priroty bugs later. This can mean, however, that some low priority bugs never get fixed.

Bugs can arise in any stage of the software lifecycle. They are most prevalent in the implementation and testing phase. Testing, as we already know, is the process of ensuring a quality bug free product. As such it is important to find as many bugs as possible in order to fix as many as possible. Note that no software, apart from the most simple, will be bug free before the testing phase. A common mistake of students is to expect there code to work perfectly once they have finished the implementation. As such they tend not to test the system thoroughly and also tend to only test the parts they know already work.

The main types of errors are -

  1. Syntax error
  2. Logic error
  3. Runtime error

Click on the related tab to find out more.