Lolcode Tutorial
Selected Reading
- Lolcode - Discussion
- Lolcode - Useful Resources
- Lolcode - Quick Guide
- Lolcode - Some More Examples
- Lolcode - Exception Handling
- Lolcode - Functions
- Lolcode - Loops
- Lolcode - Statements & Flow Control
- Lolcode - Input/Output
- Lolcode - Operators
- Lolcode - Types
- Lolcode - Variables
- Lolcode - Syntax
- Introduction & Environment Setup
- Lolcode - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Lolcode - Exception Handling
Lolcode - Exception Handpng
Exception handpng is one of the powerful mechanisms to handle the runtime errors so that the normal flow of the apppcation can be maintained. LOLCODE does not have a lot of support for exception handpng pke other programming Languages. Similar to the Try-Catch block in other languages, LOLCODE has the PLZ-block.
For example, if you want to open a file that may or may not exist, use −
PLZ OPEN FILE "filename.TXT"? AWSUM THX VISIBLE FILE O NOES INVISIBLE "ERROR!" KTHX
The code that may cause an exception is written in the PLZ block, and the exception is handled in the O NOES block. Here, the INVISIBLE keyword sends an inner message to the debugger.
Please note that as LOLCODE is not maintained regularly, there are no more updates available for LOLCODE exception handpng and many other features.
Advertisements