SlideShare uma empresa Scribd logo
1 de 9
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
EXCEPTION HANDLING



       SHEETHAL U
       sheethu@gmail.com
       www.facebook.com/sheethu
       in.linkedin.com/in/sheethal
         Ummanath
       9447531524
If this presentation helped you, please visit our
           page facebook.com/baabtra and like it.
               Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
EXCEPTION
   Exceptions are events that can modify the
    flow or control through a program.
   They are automatically triggered on errors.
   try/except : catch and recover from raised by
    you or Python exceptions
   try/finally: perform cleanup actions whether
    exceptions occur or not
   raise: trigger an exception manually in your
    code
• An exception is an event, which occurs during
  the execution of a program, that disrupts the
  normal flow of the program's instructions.
• In general, when a Python script encounters a
  situation that it can't cope with, it raises an
  exception.
• If you have some suspicious code that may
  raise an exception, you can defend your
  program by placing the suspicious code in a
  try: block.
• After the try: block, include an except:
  statement, followed by a block of code which
  handles the problem as elegantly as possible.
syntax
• try:
  You do your operations here;
  ......................
except ExceptionI:
  If there is ExceptionI, then execute this block.
except ExceptionII:
  If there is ExceptionII, then execute this block.
  ......................
else:
  If there is no exception then execute this block.
Contact Us

Mais conteúdo relacionado

Mais procurados (13)

Initial skills analysis
Initial skills analysisInitial skills analysis
Initial skills analysis
 
Initial skills analysis
Initial skills analysisInitial skills analysis
Initial skills analysis
 
initial skills analysis
initial skills analysisinitial skills analysis
initial skills analysis
 
initial skills analysis
initial skills analysisinitial skills analysis
initial skills analysis
 
Skills Analysis Sheet
Skills Analysis SheetSkills Analysis Sheet
Skills Analysis Sheet
 
Initial+skills+analysis+ (1)
Initial+skills+analysis+ (1)Initial+skills+analysis+ (1)
Initial+skills+analysis+ (1)
 
Initial skills analysis
Initial skills analysisInitial skills analysis
Initial skills analysis
 
Initialskillsanalysis
InitialskillsanalysisInitialskillsanalysis
Initialskillsanalysis
 
Initail Skills Analysis
Initail Skills AnalysisInitail Skills Analysis
Initail Skills Analysis
 
Initial Skills Analysis - Lewis Hartill
Initial Skills Analysis - Lewis HartillInitial Skills Analysis - Lewis Hartill
Initial Skills Analysis - Lewis Hartill
 
Ben pa
Ben paBen pa
Ben pa
 
Skills analysis
Skills analysisSkills analysis
Skills analysis
 
Media skills
Media skillsMedia skills
Media skills
 

Destaque (7)

Xml
XmlXml
Xml
 
Server side scripting
Server side scriptingServer side scripting
Server side scripting
 
Dbdesign
DbdesignDbdesign
Dbdesign
 
Improving spelling
Improving spellingImproving spelling
Improving spelling
 
Algebra
AlgebraAlgebra
Algebra
 
Decision support system
Decision support systemDecision support system
Decision support system
 
Logical Reasoning
Logical ReasoningLogical Reasoning
Logical Reasoning
 

Semelhante a Exception handling

Exception handling in java
Exception handling in javaException handling in java
Exception handling in java
priyankazope
 
Exception handling chapter15
Exception handling chapter15Exception handling chapter15
Exception handling chapter15
Kumar
 
Types of exceptions
Types of exceptionsTypes of exceptions
Types of exceptions
myrajendra
 
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdfVISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
NALANDACSCCENTRE
 

Semelhante a Exception handling (20)

Exceptions
ExceptionsExceptions
Exceptions
 
Exception Handling in UiPath.pptx
Exception Handling in UiPath.pptxException Handling in UiPath.pptx
Exception Handling in UiPath.pptx
 
Java exeception handling
Java exeception handlingJava exeception handling
Java exeception handling
 
Exception handling in java
Exception handling in javaException handling in java
Exception handling in java
 
Exception handling chapter15
Exception handling chapter15Exception handling chapter15
Exception handling chapter15
 
ch-3-exception-handling.pdf
ch-3-exception-handling.pdfch-3-exception-handling.pdf
ch-3-exception-handling.pdf
 
Exception handling basic
Exception handling basicException handling basic
Exception handling basic
 
Exception handling in .net
Exception handling in .netException handling in .net
Exception handling in .net
 
Exception handling in java
Exception handling  in javaException handling  in java
Exception handling in java
 
Types of exceptions
Types of exceptionsTypes of exceptions
Types of exceptions
 
Exception handling in ASP .NET
Exception handling in ASP .NETException handling in ASP .NET
Exception handling in ASP .NET
 
Exception Handling
Exception HandlingException Handling
Exception Handling
 
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdfVISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
VISUAL_BASIC_LECTURE_NOTE_A_Z_MADE_EASY.pdf
 
Maheen oop
Maheen oopMaheen oop
Maheen oop
 
Java Exceptions and Exception Handling
 Java  Exceptions and Exception Handling Java  Exceptions and Exception Handling
Java Exceptions and Exception Handling
 
Exception handling
Exception handlingException handling
Exception handling
 
Automate end user guide with Salesforce
Automate end user guide with SalesforceAutomate end user guide with Salesforce
Automate end user guide with Salesforce
 
Chap2 exception handling
Chap2 exception handlingChap2 exception handling
Chap2 exception handling
 
Java-Unit 3- Chap2 exception handling
Java-Unit 3- Chap2 exception handlingJava-Unit 3- Chap2 exception handling
Java-Unit 3- Chap2 exception handling
 
Traffic mania article-bot full software free
Traffic mania article-bot full software freeTraffic mania article-bot full software free
Traffic mania article-bot full software free
 

Mais de baabtra.com - No. 1 supplier of quality freshers

Mais de baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Último (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Exception handling

  • 1.
  • 2. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 3. EXCEPTION HANDLING SHEETHAL U sheethu@gmail.com www.facebook.com/sheethu in.linkedin.com/in/sheethal Ummanath 9447531524
  • 4. If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com
  • 5. EXCEPTION  Exceptions are events that can modify the flow or control through a program.  They are automatically triggered on errors.  try/except : catch and recover from raised by you or Python exceptions  try/finally: perform cleanup actions whether exceptions occur or not  raise: trigger an exception manually in your code
  • 6. • An exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program's instructions. • In general, when a Python script encounters a situation that it can't cope with, it raises an exception.
  • 7. • If you have some suspicious code that may raise an exception, you can defend your program by placing the suspicious code in a try: block. • After the try: block, include an except: statement, followed by a block of code which handles the problem as elegantly as possible.
  • 8. syntax • try: You do your operations here; ...................... except ExceptionI: If there is ExceptionI, then execute this block. except ExceptionII: If there is ExceptionII, then execute this block. ...................... else: If there is no exception then execute this block.