The three types of errors or exceptions include:
syntax errors, run-time errors, and logic errors
Let me explain them in more detail below:
Syntax errors:
#the most common type of errors
#As you write the code this is when they appear
#As you type the code into the editor VB checks the code and lets you know if and when a mistake has been made
#If you spell a word wrong or if you do not use a language element properly VB will let you know
# As soon as this error happens you can fix them in the coding environment
Run-time errors:
#After you compile and run your code this is when run time errors appear
# No syntax errors show and for this reason the code may appear to be right, however the code will not run
# eg: you write code to open a file, you do this the right way, corruption of the file may occur and for this reason the open function stops running because the application cannot carry out this function.
# Re-write this non working code to fix this issue, then recompile and rerun the code
Logic errors:
#When the application is in use these errors occur
# In response to the users actions logic errors are unexpected and unwanted
# eg: The application may stop working all together or just stop working within parameters that are expected because of an outside influence or mistyped key
#These errors are difficult to fix, it is not always easy to source where they have come from
No comments:
Post a Comment