Preview

alamat ng mangga

Powerful Essays
Open Document
Open Document
1342 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
alamat ng mangga
C H A P T E R 1.5

Error Handling
CHAPTER OUTLINE
PROGRAMMING ERRORS
STRUCTURED EXCEPTION HANDLING
UNSTRUCTURED EXCEPTION HANDLING

INTRODUCTION

Chapter Objectives
At the end of the chapter, the student should be able to:
 understand the different types of programming errors;
 use unstructured error handling in writing algorithms; and
 use unstructured error handling in writing algorithms.

2

INTRODUCTION

Programming Errors
 When computer programs are written, there will always be a possibility of writing an erroneous code known as bugs.
 Bugs make a program perform differently from the designed algorithm, or it might not run at all.  Hence, when there is an error in program, it has to be located and corrected.

INTRODUCTION

Locating Errors
 The process of finding and fixing errors in a program is called debugging.
 Debugging is an iterative process which involves repeatedly running and writing the program until all errors are gone.
 In most cases, a program need not to be stopped for debugging through the process of Edit and Continue in
Visual BASIC (program will stop where the error occurred and may be continued after editing).

CATEGORIES OF ERRORS

Three Major Categories of Errors
1. Compilation Errors
 Compilation errors are errors due to syntax issues such as misspelling, improper syntax or wrong keyword use.
 Code with compilation errors are highlighted with a blue underline as shown below:

 Note that, the presence of compilation error prevent a program from running.

CATEGORIES OF ERRORS

Three Major Categories of Errors (cont.)
2. Run Time Errors
 Run time errors occur when a combination of data and code causes an invalid condition during runtime in what otherwise appears to be a valid code (e.g. when the user enters a string data for a numeric variable) during coding.
 In the example below, a text value was placed in a numeric variable:

CATEGORIES OF ERRORS

You May Also Find These Documents Helpful

  • Satisfactory Essays

    LAb1Ecet230

    • 221 Words
    • 3 Pages

    error is a problem that will cause the program not to run. The Warning is advisor to a issue that may result as a bad input or output.…

    • 221 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Mang Minno

    • 984 Words
    • 4 Pages

    In “Mang Minno”, a short story within ‘Where The Elephants Dance’ by Tess U Holthe , a young boy named Roman encounters a man named Mang Minno, who is believed by the island people to be Jonah from the Bible. When Roman meets him, he wishes to learn how to catch fish, so that he can show them to his father. He thinks that all he is getting himself involved in is a method with which to gain large amounts of fish, very quickly. However, he soon finds that he is getting involved in something far more sinister. As the story progresses, it becomes clear the Mang Minno is some sort of evil entity. However, without looking for clues as to who and what Mang Minno is, this story cannot be fully comprehended. In this short story, the antagonist, Mang Minno, displays similarities to vampires, and these similarities are important in clarifying different pieces of the story.…

    • 984 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    unang pasahod

    • 1278 Words
    • 6 Pages

    Total manufacturing costs charged to production during the year (includes direct material, direct labor, and overhead equal to 60% of direct labor cost)…

    • 1278 Words
    • 6 Pages
    Satisfactory Essays
  • Satisfactory Essays

    MABUHAY KA , ANAK KO

    • 946 Words
    • 4 Pages

    Flat Parsley or garden parsley (Petroselinum crispum) is a species of Petroselinum in the family Apiaceae, native to the centralMediterranean region (southern Italy, Algeria, and Tunisia), naturalized elsewhere in Europe, and widely cultivated as an herb, a spice, and a vegetable.…

    • 946 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    A hunter was out hunting one day on the forest and killed a deer. Since it was very late in the day, he couldn’t take the deer home. He skinned it. He hang it as high as he could on the branch of a tall pine tree. The following day he returned for his deer, but the deer was gone. He searched the area for tracks. When he found clues, he went to the justice of peace for help. The justice of peace asked him if he had any idea as to who stole the deer. The hunter replied that he had seen the thief and he didn’t know who it was, but he could give an accurate description of the man who stole the deer. The justice of the peace said if he knows something, tell him what kind of man he is. The hunter replied that he is shorter than him, he is older, and he had a yellow bull dog with him. The justice of the peace asked how the hunter knew all that. The hunter replied that he knew he is shorter than the hunter because he had to put some logs beneath the tree to reach the deer. The justice of the peace asked how he knew he is old. Then the hunter replied because he took short steps, like an old man. The judge was convinced and granted permission to look for a man fitting that description. After searching for some time, the hunter and the justice of the peace arrived at a house. They saw a yellow bulldog. They knocked on the door and a small, old man appeared. Then they searched his barn and found the stolen…

    • 1098 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Wolfgang Amadeus Mozart (German: [ˈvɔlfɡaŋ amaˈdeus ˈmoːtsaʁt], English see fn.),[1] baptismal name Johannes Chrysostomus Wolfgangus Theophilus Mozart[2] (27 January 1756 – 5 December 1791), was a prolific and influential composer of the Classical era.…

    • 256 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    Potang Ina Mo

    • 1305 Words
    • 6 Pages

    An idiom (Latin: idioma, “special property”, f. Greek: ἰδίωμα — idiōma, “special feature, special phrasing”, f. Greek: ἴδιος — idios, “one’s own”) is an expression, word, or phrase that has a figurative meaning that is comprehended in regard to a common use of that expression that is separate from the literal meaning or definition of the words of which it is made.[1] There are estimated to be at least 25,000 idiomatic expressions in the English language.[2]…

    • 1305 Words
    • 6 Pages
    Better Essays
  • Good Essays

    ang mga hudas

    • 1396 Words
    • 4 Pages

    The Move, from Birmingham, England, were one of the leading British rock bands of the 1960s. They scored nine Top 20 UK singles in five years, but were among the most popular British bands not to find any real success in the United States.[4][5] Although bassist-vocalist Chris "Ace" Kefford was the original leader, for most of their career, The Move was led by guitarist, singer and songwriter Roy Wood. He wrote all the group's UK singles and, from 1968, also sang lead vocals on many songs, although Carl Wayne was the main lead singer up to 1970. Initially, the band had 4 main vocalists (Wayne, Wood, Trevor Burton and Kefford) who split the lead vocals on a number of their earlier songs.[4]Formation and early career[edit]…

    • 1396 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Bakla Si Manong

    • 343 Words
    • 2 Pages

    The importance of our investigatory for the people is they can tenderize the meat is short period of time. They can tenderize the meat with hassle free and they’re not difficult to tenderize it and so that they can prepare it fast.…

    • 343 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Hunyango Sa Bato

    • 368 Words
    • 2 Pages

    This novel is about an Engineer whom once dreams to be a writer but due to his father’s request become an Engineer. His dreams to be a writer originate with his fascination to an old man that was known to witness every crime in their place. But this field doesn’t hinder him to narrate his experience in work and experience he gain with other people, just like what the old man says. “Ang kwento ay dapat kwento ng buhay mo para lagging totoo. ”Para hindi napapasubalian kasi ikaw lang talaga ang nakakaranas.” (Page 8)…

    • 368 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    kanbas ng lipunan

    • 477 Words
    • 2 Pages

    “Sa Kanbas ng Lipunan” had taught me so many things that are really unfair in regards with the world we live in. Same as the painter, I tend to question myself things like: “What are the thing did I done to the less fortunate?” And “am I really bothered by poverty to which most of the Filipinos are currently facing or am I really used to these now”. In that simple but very eye-widening video made and inspired by the painter named Sir Joey Velasco, he made me realize that I was the same as him. The 12 children who replaced the 12 apostles in the painting “The Last Supper” made me witness that poverty, hunger, and despair is inevitable with us and that we should everything within our power to end this disparity.…

    • 477 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    C++ Notes

    • 2751 Words
    • 12 Pages

    Programs to be implemented in the lab: Sr. No 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. Topics on which the programs have to be done in lab If – else Reverse an integer & find sum of digits of an integer using do-while Factorial using do-while Drawing a pyramid using for Calculator using switch Function Recursive function Single dimensional array Matrix Multiplication using…

    • 2751 Words
    • 12 Pages
    Powerful Essays
  • Better Essays

    ang aking pamilya

    • 4192 Words
    • 17 Pages

    In mathematics, a rational function is any function which can be defined by a rational fraction, i.e. an algebraic fraction such that both the numerator and the denominator are polynomials. The coefficients of the polynomials need not be rational numbers, they may be taken in any field K. In this case, one speaks of a rational function and a rational fraction over K. The values of the variables may be taken in any field L containing K. Then the domain of the function is the set of the values of the variables for which the denominator is not zero and the codomain is L. For example, a rational fraction in one variable over the rational numbers defines a complex function, which has the complex numbers as domain and codomain.…

    • 4192 Words
    • 17 Pages
    Better Essays
  • Good Essays

    Ang Alamat ng Paru-paro

    • 509 Words
    • 3 Pages

    The Babylonians began their rise to power in the region of Mesopotamia around 1900 B.C. This was at a time when Mesopotamia was largely unstable, prone to conflict and invasion, and not at all unified. This early period, known as the Old Babylonian Period, is characterized by over 300 years of rule of theAmorites, who had come from west of the Euphrates River, and formed an empire based in the city-state of Babylon. This empire was a monarchy that had conquered the outer Amorite territories and united them into one kingdom.…

    • 509 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Baliwag Lechon Manok

    • 1203 Words
    • 5 Pages

    Dolores was born and raised in Baliwag, Bulacan. She said that the simple utterance of the province evoked memories of true Filipino foods and hospitality. “If the name can have that same effect on the ordinary Filipino, the business just might have a good chance of succeeding,” she thought.…

    • 1203 Words
    • 5 Pages
    Good Essays