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

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

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...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 

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.