SlideShare a Scribd company logo
 Errors in Lisp
overviewGeneral error-signaling functionsSpecialized error signaling Forms and MacrosSpecial Forms for exhaustive Case Analysis
List functions may signal an error when given incorrect arguments.Each implementation of common lisp will provide an interactive debugger that prints the error message along with suitable contextual information such as which function detected the error.Conditions subsume and generalize the notation of errors.The conditions system also provides means for handling conditions and for restarting a computation after a condition has been signaled.
General error-signaling functionsThese functions provide mechanisms for warnings, breaks, continuable errors, and fatal errors.The caller specifies an error message( a string) that may be processed by the error handling mechanism.Error message should not contain a new-line character either at the beginning or at the end.
 error format-string &rest argsThe function signals a fatal error. It is impossible to continue from this kind of error. Warn format-string &rest argsWarn prints an error message but normally doesn’t go into the debugger. ‘This may be controlled by the variable break *break-on-warnings*If the variable *break-on-warnings* is not null, then the function warn behaves like break.
 cerror continue-format-string error-format-string &rest argsCerror is used to signal continuable errors, it allows the program to be continued from debugger after resolving the error. break &optional format-string &rest argsBreak prints the message and goes directly into the debugger, without allowing any possibility of interception by programmed error-handling facilities.
Specialized error signaling Forms and MacrosThese facilitate the user to insert error checks into the code.Check-type place typespec [string]Check-type signals an error if the contents of place are not of the desired type.The user will be asked for a new value, the check-type will store the new value in place and start over.The place must be a generalized variable reference acceptable to setf.Typespec must be a type specifier. (it is not evaluated.)String must be an English description of the type, starting with an indefinite article ( “a” or “an”). (it is evaluated.)
assert test-form [({place}* ) [string {arg}*]]assert signals an error if the value of the test-form is nil.Continuing from this error allows the user to alter the values of some variables , and assert will start over, evaluating the test form again.assert returns nil.
Special Forms for exhaustive Case Analysisetypecase and ecase are similar to typecase and case, but signal a continuable error if no clause is selected.Ctypecase and ccase are similar to typecase and case, but signal a continuable error if no clause is selected.etypecase keyform {(type {form}* )}*This control construct is similar to typecase, but no explicit otherwise or t clause is permitted.
To supply an application-specific error, the user must use typecase with an otherwise clause containing a call to error. Ctypecase keyplace { (type {form}* )}*The keyplace must be a generalized  variable reference acceptable to setf.If n o clause is satisfied, ctypecase signals an error with a message constructed from the clauses.
ecase keyform {({({key}*) | key} {form}* )}*If no clause is satisfied, ecase signals an error with a message constructed from the clauses.It is not permissible to continue from this error.To supply an error message, the user must use case with an otherwise clause containing a call to error.
ccase keyplace {({({key}*) | key} {form}* )}*The keyplace must be a generalized vale reference acceptable to setf.Continuing from this error causes ccase to accept a new value from the user, store it into keyplace, and start over, making the clause tests again.Subforms of keyplace may be evaluated multiple times.
Visit more self help tutorialsPick a tutorial of your choice and browse through it at your own pace.The tutorials section is free, self-guiding and will not involve any additional support.Visit us at www.dataminingtools.net

More Related Content

What's hot (17)

Switch Case in C Programming
Switch Case in C Programming
Sonya Akter Rupa
 
If-else and switch-case
If-else and switch-case
Manash Kumar Mondal
 
Timedobserver
Timedobserver
mussawir20
 
10. switch case
10. switch case
Way2itech
 
Ppt lesson 06
Ppt lesson 06
Linda Bodrie
 
JetBrains MPS: Editor Aspect
JetBrains MPS: Editor Aspect
Mikhail Barash
 
Software Engineering - Module 3: Lesson7
Software Engineering - Module 3: Lesson7
ArraLafuente
 
OOPS With CSharp - Jinal Desai .NET
OOPS With CSharp - Jinal Desai .NET
jinaldesailive
 
C# conditional branching statement
C# conditional branching statement
baabtra.com - No. 1 supplier of quality freshers
 
C rules
C rules
sykat roy
 
itft-Decision making and branching in java
itft-Decision making and branching in java
Atul Sehdev
 
Chapter 2 : Programming with Java Statements
Chapter 2 : Programming with Java Statements
It Academy
 
Control structures
Control structures
Gehad Enayat
 
Programming style guideline very good
Programming style guideline very good
Dang Hop
 
Selection statements
Selection statements
Harsh Dabas
 
Control structures in Java
Control structures in Java
Ravi_Kant_Sahu
 
Java Decision Control
Java Decision Control
Jayfee Ramos
 
Switch Case in C Programming
Switch Case in C Programming
Sonya Akter Rupa
 
10. switch case
10. switch case
Way2itech
 
JetBrains MPS: Editor Aspect
JetBrains MPS: Editor Aspect
Mikhail Barash
 
Software Engineering - Module 3: Lesson7
Software Engineering - Module 3: Lesson7
ArraLafuente
 
OOPS With CSharp - Jinal Desai .NET
OOPS With CSharp - Jinal Desai .NET
jinaldesailive
 
itft-Decision making and branching in java
itft-Decision making and branching in java
Atul Sehdev
 
Chapter 2 : Programming with Java Statements
Chapter 2 : Programming with Java Statements
It Academy
 
Control structures
Control structures
Gehad Enayat
 
Programming style guideline very good
Programming style guideline very good
Dang Hop
 
Selection statements
Selection statements
Harsh Dabas
 
Control structures in Java
Control structures in Java
Ravi_Kant_Sahu
 
Java Decision Control
Java Decision Control
Jayfee Ramos
 

Viewers also liked (20)

MS SQL SERVER: Microsoft naive bayes algorithm
MS SQL SERVER: Microsoft naive bayes algorithm
DataminingTools Inc
 
WEKA: Output Knowledge Representation
WEKA: Output Knowledge Representation
DataminingTools Inc
 
Anime
Anime
Yarex Mussa Gonzalez
 
Portavocía en redes sociales
Portavocía en redes sociales
Muévete en bici por Madrid
 
MS Sql Server: Reporting introduction
MS Sql Server: Reporting introduction
DataminingTools Inc
 
LISP: Declarations In Lisp
LISP: Declarations In Lisp
DataminingTools Inc
 
Introduction To Programming in Matlab
Introduction To Programming in Matlab
DataminingTools Inc
 
MED dra Coding -MSSO
MED dra Coding -MSSO
drabhishekpitti
 
R Statistics
R Statistics
DataminingTools Inc
 
How To Make Pb J
How To Make Pb J
spencer shanks
 
Facebook: An Innovative Influenza Pandemic Early Warning System
Facebook: An Innovative Influenza Pandemic Early Warning System
Chen Luo
 
WEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been Learned
DataminingTools Inc
 
Paramount Search Partners
Paramount Search Partners
jjmcdermott
 
Festivals Refuerzo
Festivals Refuerzo
guest9536ef5
 
Data Applied:Decision Trees
Data Applied:Decision Trees
DataminingTools Inc
 
RapidMiner: Setting Up A Process
RapidMiner: Setting Up A Process
DataminingTools Inc
 
Simulation
Simulation
DataminingTools Inc
 
Probability And Its Axioms
Probability And Its Axioms
DataminingTools Inc
 
MS Sql Server: Doing Calculations With Functions
MS Sql Server: Doing Calculations With Functions
DataminingTools Inc
 
Anime
Anime
Yarex Mussa Gonzalez
 
MS SQL SERVER: Microsoft naive bayes algorithm
MS SQL SERVER: Microsoft naive bayes algorithm
DataminingTools Inc
 
WEKA: Output Knowledge Representation
WEKA: Output Knowledge Representation
DataminingTools Inc
 
MS Sql Server: Reporting introduction
MS Sql Server: Reporting introduction
DataminingTools Inc
 
Introduction To Programming in Matlab
Introduction To Programming in Matlab
DataminingTools Inc
 
Facebook: An Innovative Influenza Pandemic Early Warning System
Facebook: An Innovative Influenza Pandemic Early Warning System
Chen Luo
 
WEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been Learned
DataminingTools Inc
 
Paramount Search Partners
Paramount Search Partners
jjmcdermott
 
Festivals Refuerzo
Festivals Refuerzo
guest9536ef5
 
RapidMiner: Setting Up A Process
RapidMiner: Setting Up A Process
DataminingTools Inc
 
MS Sql Server: Doing Calculations With Functions
MS Sql Server: Doing Calculations With Functions
DataminingTools Inc
 
Ad

Similar to LISP: Errors In Lisp (20)

Annotations in Java with Example.pdf
Annotations in Java with Example.pdf
SudhanshiBakre1
 
Java 7 new features
Java 7 new features
Shivam Goel
 
Cordova training : Day 3 - Introduction to Javascript
Cordova training : Day 3 - Introduction to Javascript
Binu Paul
 
C language UPTU Unit3 Slides
C language UPTU Unit3 Slides
Anurag University Hyderabad
 
C# language basics (Visual Studio)
C# language basics (Visual Studio)
rnkhan
 
C# language basics (Visual studio)
C# language basics (Visual studio)
rnkhan
 
java notes.pdf
java notes.pdf
RajkumarHarishchandr1
 
Java input Scanner
Java input Scanner
Huda Alameen
 
Introduction to C#
Introduction to C#
Raghuveer Guthikonda
 
Principals of Programming in CModule -5.pdfModule_2_P2 (1).pdf
Principals of Programming in CModule -5.pdfModule_2_P2 (1).pdf
anilcsbs
 
Intake 38 2
Intake 38 2
Mahmoud Ouf
 
Co&al lecture-07
Co&al lecture-07
AbdulKarim563520
 
Chapter 8 - Exceptions and Assertions Edit summary
Chapter 8 - Exceptions and Assertions Edit summary
Eduardo Bergavera
 
Java căn bản - Chapter8
Java căn bản - Chapter8
Vince Vo
 
Bt0067 c programming and data structures 1
Bt0067 c programming and data structures 1
Techglyphs
 
Cprogrammingprogramcontrols
Cprogrammingprogramcontrols
teach4uin
 
C++ PROGRAMMING BASICS
C++ PROGRAMMING BASICS
Aami Kakakhel
 
Ast transformation
Ast transformation
Gagan Agrawal
 
CS305PC_C++_UNIT 2.pdf jntuh third semester
CS305PC_C++_UNIT 2.pdf jntuh third semester
VeeraswamyDasari2
 
Final requirement
Final requirement
arjoy_dimaculangan
 
Annotations in Java with Example.pdf
Annotations in Java with Example.pdf
SudhanshiBakre1
 
Java 7 new features
Java 7 new features
Shivam Goel
 
Cordova training : Day 3 - Introduction to Javascript
Cordova training : Day 3 - Introduction to Javascript
Binu Paul
 
C# language basics (Visual Studio)
C# language basics (Visual Studio)
rnkhan
 
C# language basics (Visual studio)
C# language basics (Visual studio)
rnkhan
 
Java input Scanner
Java input Scanner
Huda Alameen
 
Principals of Programming in CModule -5.pdfModule_2_P2 (1).pdf
Principals of Programming in CModule -5.pdfModule_2_P2 (1).pdf
anilcsbs
 
Chapter 8 - Exceptions and Assertions Edit summary
Chapter 8 - Exceptions and Assertions Edit summary
Eduardo Bergavera
 
Java căn bản - Chapter8
Java căn bản - Chapter8
Vince Vo
 
Bt0067 c programming and data structures 1
Bt0067 c programming and data structures 1
Techglyphs
 
Cprogrammingprogramcontrols
Cprogrammingprogramcontrols
teach4uin
 
C++ PROGRAMMING BASICS
C++ PROGRAMMING BASICS
Aami Kakakhel
 
CS305PC_C++_UNIT 2.pdf jntuh third semester
CS305PC_C++_UNIT 2.pdf jntuh third semester
VeeraswamyDasari2
 
Ad

More from DataminingTools Inc (20)

Terminology Machine Learning
Terminology Machine Learning
DataminingTools Inc
 
Techniques Machine Learning
Techniques Machine Learning
DataminingTools Inc
 
Machine learning Introduction
Machine learning Introduction
DataminingTools Inc
 
Areas of machine leanring
Areas of machine leanring
DataminingTools Inc
 
AI: Planning and AI
AI: Planning and AI
DataminingTools Inc
 
AI: Logic in AI 2
AI: Logic in AI 2
DataminingTools Inc
 
AI: Logic in AI
AI: Logic in AI
DataminingTools Inc
 
AI: Learning in AI 2
AI: Learning in AI 2
DataminingTools Inc
 
AI: Learning in AI
AI: Learning in AI
DataminingTools Inc
 
AI: Introduction to artificial intelligence
AI: Introduction to artificial intelligence
DataminingTools Inc
 
AI: Belief Networks
AI: Belief Networks
DataminingTools Inc
 
AI: AI & Searching
AI: AI & Searching
DataminingTools Inc
 
AI: AI & Problem Solving
AI: AI & Problem Solving
DataminingTools Inc
 
Data Mining: Text and web mining
Data Mining: Text and web mining
DataminingTools Inc
 
Data Mining: Outlier analysis
Data Mining: Outlier analysis
DataminingTools Inc
 
Data Mining: Mining stream time series and sequence data
Data Mining: Mining stream time series and sequence data
DataminingTools Inc
 
Data Mining: Mining ,associations, and correlations
Data Mining: Mining ,associations, and correlations
DataminingTools Inc
 
Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysis
DataminingTools Inc
 
Data warehouse and olap technology
Data warehouse and olap technology
DataminingTools Inc
 
Data Mining: Data processing
Data Mining: Data processing
DataminingTools Inc
 
AI: Introduction to artificial intelligence
AI: Introduction to artificial intelligence
DataminingTools Inc
 
Data Mining: Text and web mining
Data Mining: Text and web mining
DataminingTools Inc
 
Data Mining: Mining stream time series and sequence data
Data Mining: Mining stream time series and sequence data
DataminingTools Inc
 
Data Mining: Mining ,associations, and correlations
Data Mining: Mining ,associations, and correlations
DataminingTools Inc
 
Data Mining: Graph mining and social network analysis
Data Mining: Graph mining and social network analysis
DataminingTools Inc
 
Data warehouse and olap technology
Data warehouse and olap technology
DataminingTools Inc
 

Recently uploaded (20)

Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Introduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUE
Google Developer Group On Campus European Universities in Egypt
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
cnc-drilling-dowel-inserting-machine-drillteq-d-510-english.pdf
AmirStern2
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 

LISP: Errors In Lisp

  • 2. overviewGeneral error-signaling functionsSpecialized error signaling Forms and MacrosSpecial Forms for exhaustive Case Analysis
  • 3. List functions may signal an error when given incorrect arguments.Each implementation of common lisp will provide an interactive debugger that prints the error message along with suitable contextual information such as which function detected the error.Conditions subsume and generalize the notation of errors.The conditions system also provides means for handling conditions and for restarting a computation after a condition has been signaled.
  • 4. General error-signaling functionsThese functions provide mechanisms for warnings, breaks, continuable errors, and fatal errors.The caller specifies an error message( a string) that may be processed by the error handling mechanism.Error message should not contain a new-line character either at the beginning or at the end.
  • 5.  error format-string &rest argsThe function signals a fatal error. It is impossible to continue from this kind of error. Warn format-string &rest argsWarn prints an error message but normally doesn’t go into the debugger. ‘This may be controlled by the variable break *break-on-warnings*If the variable *break-on-warnings* is not null, then the function warn behaves like break.
  • 6.  cerror continue-format-string error-format-string &rest argsCerror is used to signal continuable errors, it allows the program to be continued from debugger after resolving the error. break &optional format-string &rest argsBreak prints the message and goes directly into the debugger, without allowing any possibility of interception by programmed error-handling facilities.
  • 7. Specialized error signaling Forms and MacrosThese facilitate the user to insert error checks into the code.Check-type place typespec [string]Check-type signals an error if the contents of place are not of the desired type.The user will be asked for a new value, the check-type will store the new value in place and start over.The place must be a generalized variable reference acceptable to setf.Typespec must be a type specifier. (it is not evaluated.)String must be an English description of the type, starting with an indefinite article ( “a” or “an”). (it is evaluated.)
  • 8. assert test-form [({place}* ) [string {arg}*]]assert signals an error if the value of the test-form is nil.Continuing from this error allows the user to alter the values of some variables , and assert will start over, evaluating the test form again.assert returns nil.
  • 9. Special Forms for exhaustive Case Analysisetypecase and ecase are similar to typecase and case, but signal a continuable error if no clause is selected.Ctypecase and ccase are similar to typecase and case, but signal a continuable error if no clause is selected.etypecase keyform {(type {form}* )}*This control construct is similar to typecase, but no explicit otherwise or t clause is permitted.
  • 10. To supply an application-specific error, the user must use typecase with an otherwise clause containing a call to error. Ctypecase keyplace { (type {form}* )}*The keyplace must be a generalized variable reference acceptable to setf.If n o clause is satisfied, ctypecase signals an error with a message constructed from the clauses.
  • 11. ecase keyform {({({key}*) | key} {form}* )}*If no clause is satisfied, ecase signals an error with a message constructed from the clauses.It is not permissible to continue from this error.To supply an error message, the user must use case with an otherwise clause containing a call to error.
  • 12. ccase keyplace {({({key}*) | key} {form}* )}*The keyplace must be a generalized vale reference acceptable to setf.Continuing from this error causes ccase to accept a new value from the user, store it into keyplace, and start over, making the clause tests again.Subforms of keyplace may be evaluated multiple times.
  • 13. Visit more self help tutorialsPick a tutorial of your choice and browse through it at your own pace.The tutorials section is free, self-guiding and will not involve any additional support.Visit us at www.dataminingtools.net