SlideShare a Scribd company logo
Ready
Marjan Nikolovski
Father, Dev, CEO/Emit Knowledge
Down the rabbit hole
Error handling examined
try {
}
// Twitter: @m4rjann
// Blog: emitknowledge.com/research-labs
Ready
Ready
Agenda
• Error theory;
• Error types;
• Handling error per type;
• Responsible sides;
• Error handling strategies;
• Error handling for business logic;
• Error handling for client;
• Error handling for web applications;
• Log analytics;
Ready
ERROR IS AN ANY INTERUPTION THAT STOPS THE
SYSTEM TO EXECUTE A BUSINESS CONTEXT
Ready
A system must have a good strategy when it comes to error handling
Most of the code in a solution is trying to handle different types of errors and
exceptions
It is easy to specify and write code to make the system operable.
Hard times come when trying to predict what can go wrong
Ready
Bugs, issues we can’t predict nor control.
Ex: Stackoverflow, Nullpointer...
Error types
using System;
class Program
{
static void Main()
{
User appUser = DomainServices.User.GetByUsername(@“marjann”);
Console.WriteLine(appUser.Email);
}
}
Ready
Error from invalid input.
Ex: We expect integer value, the user enters some random characters...
Error types
using System;
class Program
{
static void Main()
{
var userIdInput = Console.ReadLine();
int id = int.Parse(userIdInput);
Console.WriteLine(id);
}
}
Ready
Infrastructural problems.
Ex: Missing write permissions on server, full disk, DB not available...
Error types
using System;
class Program
{
static void Main()
{
var user = UserRepository.GetByUsername(@”marjann”);
Console.WriteLine(user.Email);
}
}
Ready
Bugs are system problems that we can’t handle unless we apply a patch.
So what types of errors we
can handle?
Invalid data entry is a system problem that we can handle proactively.
If we have infrastructural problems, the system should be able to notify the
system administrators.
Ready
End clients who are using the system.
Responsible sides
System administrators.
Software developers.
Ready
Software developers.
Who should handle the
bugs?
Ready
Global – architectural decision on system level.
Error handling strategies
Local-contextual – handling errors in a process/method/action.
Ready
КЛИЕНТ/КОРИСНИЧКИ
ИНТЕРФЕЈС
БИЗНИС ЛОГИКА
ПОДАТОЧНО РЕПОЗИТОРИ
АПИ СЕРВИСИ
ЕКСТЕРНИ СЕРВИСИ
СПРАВУВАЊЕ
СО ГРЕШКИ
ERROR
HANDLING
Web/Mobile/Device REST API SERVICES
BUSINESS LOGIC
DATA REPOSITORY EXTERNAL SERVICES
Ready
Global perspective of the system.
GLOBAL STRATEGY
Centralized error handling.
We want detailed error instead of wrapped exception.
We want execution details.
We want unified error messages.
Ready
GLOBAL STRATEGY
Internally, a system should not hide the exceptions.
Ex: User.IsExistingUsername(“marjann”) -> DbConnetionException != false
Externally, a system should always be transparent and should support unified
error information when an error occurs.
Ex: Invalid username, Username is not valid!?
Ready
Say hello to the local context.
What if we can retry?
Use local context as an exception to the rule!
We can’t predict and handle all of the errors, but we must keep the system alive.
Exception to the rule: If it does not work fake it!
Ready
Unification of errors, codes and groups.
Error handling for business
logic
Information about an error(Error Info) against Exceptions.
Enrich an error with data for logging aspect.
Ready
Demo
Ready
Be transparent and show enough information to the end user.
Error handling for client
Ready
Demo
Ready
Error message localization.
Error handling for web
applications
Transferring error information back to the app.
Ready
Demo
Ready
Who, What, How, Where, When?
Log analytics
PROM – tool for process mining.
We should be able to answer:
- How our system is used?
- Where our system perform slow?
- Parameters of execution?
- Patterns of execution?
Ready
Ready
catch(PPTException up){
}
Logger.Log(“QUESTIONS?”, up);
throw up;

More Related Content

Similar to Marjan.nikolovski down the rabbit hole error handling examined-v01

Defect Tracking Software Project Presentation
Defect Tracking Software Project PresentationDefect Tracking Software Project Presentation
Defect Tracking Software Project Presentation
Shiv Prakash
 
CSCI-383 Lecture 5-6-7: Object-Oriented Design
CSCI-383 Lecture 5-6-7: Object-Oriented DesignCSCI-383 Lecture 5-6-7: Object-Oriented Design
CSCI-383 Lecture 5-6-7: Object-Oriented Design
JI Ruan
 
Dependable Software Development in Software Engineering SE18
Dependable Software Development in Software Engineering SE18Dependable Software Development in Software Engineering SE18
Dependable Software Development in Software Engineering SE18
koolkampus
 
Software Testing overview jay prakash maurya.pptx
Software Testing overview jay prakash maurya.pptxSoftware Testing overview jay prakash maurya.pptx
Software Testing overview jay prakash maurya.pptx
JayPrakash779563
 
Appsec Agility: A Brief Tour
Appsec Agility: A Brief TourAppsec Agility: A Brief Tour
Appsec Agility: A Brief Tour
Robert Keefer
 
Intro To AOP
Intro To AOPIntro To AOP
Intro To AOP
elliando dias
 
Testingfor Sw Security
Testingfor Sw SecurityTestingfor Sw Security
Testingfor Sw Security
ankitmehta21
 
Requirement checklist
Requirement checklistRequirement checklist
Requirement checklist
wajahat Gul
 
EDD (Error Driven Development)
EDD (Error Driven Development)EDD (Error Driven Development)
EDD (Error Driven Development)
Daniel Andrews
 
Defect MgmtBugDay Bangkok 2009: Defect Management
Defect MgmtBugDay Bangkok 2009: Defect ManagementDefect MgmtBugDay Bangkok 2009: Defect Management
Defect MgmtBugDay Bangkok 2009: Defect Management
guest476528
 
Consulting
ConsultingConsulting
Consulting
Markus Voelter
 
Agile Mumbai 2019 Conference | Intelligent DevOps enabling Enterprise Agilit...
Agile Mumbai 2019 Conference |  Intelligent DevOps enabling Enterprise Agilit...Agile Mumbai 2019 Conference |  Intelligent DevOps enabling Enterprise Agilit...
Agile Mumbai 2019 Conference | Intelligent DevOps enabling Enterprise Agilit...
AgileNetwork
 
ISTQBCH1 Manual Testing.pptx
ISTQBCH1 Manual Testing.pptxISTQBCH1 Manual Testing.pptx
ISTQBCH1 Manual Testing.pptx
rajkamalv
 
So You Just Inherited a $Legacy Application… NomadPHP July 2016
So You Just Inherited a $Legacy Application… NomadPHP July 2016So You Just Inherited a $Legacy Application… NomadPHP July 2016
So You Just Inherited a $Legacy Application… NomadPHP July 2016
Joe Ferguson
 
RSA 2015 Blending the Automated and the Manual: Making Application Vulnerabil...
RSA 2015 Blending the Automated and the Manual: Making Application Vulnerabil...RSA 2015 Blending the Automated and the Manual: Making Application Vulnerabil...
RSA 2015 Blending the Automated and the Manual: Making Application Vulnerabil...
Denim Group
 
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
 
Software Bugs A Software Architect Point Of View
Software Bugs    A Software Architect Point Of ViewSoftware Bugs    A Software Architect Point Of View
Software Bugs A Software Architect Point Of View
Shahzad
 
01 fundamentals of testing
01 fundamentals of testing01 fundamentals of testing
01 fundamentals of testing
Ilham Wahyudi
 
Shravan kumar vanamala
Shravan kumar vanamalaShravan kumar vanamala
Shravan kumar vanamala
Shravan vanamala
 
Security engineering 101 when good design & security work together
Security engineering 101  when good design & security work togetherSecurity engineering 101  when good design & security work together
Security engineering 101 when good design & security work together
Wendy Knox Everette
 

Similar to Marjan.nikolovski down the rabbit hole error handling examined-v01 (20)

Defect Tracking Software Project Presentation
Defect Tracking Software Project PresentationDefect Tracking Software Project Presentation
Defect Tracking Software Project Presentation
 
CSCI-383 Lecture 5-6-7: Object-Oriented Design
CSCI-383 Lecture 5-6-7: Object-Oriented DesignCSCI-383 Lecture 5-6-7: Object-Oriented Design
CSCI-383 Lecture 5-6-7: Object-Oriented Design
 
Dependable Software Development in Software Engineering SE18
Dependable Software Development in Software Engineering SE18Dependable Software Development in Software Engineering SE18
Dependable Software Development in Software Engineering SE18
 
Software Testing overview jay prakash maurya.pptx
Software Testing overview jay prakash maurya.pptxSoftware Testing overview jay prakash maurya.pptx
Software Testing overview jay prakash maurya.pptx
 
Appsec Agility: A Brief Tour
Appsec Agility: A Brief TourAppsec Agility: A Brief Tour
Appsec Agility: A Brief Tour
 
Intro To AOP
Intro To AOPIntro To AOP
Intro To AOP
 
Testingfor Sw Security
Testingfor Sw SecurityTestingfor Sw Security
Testingfor Sw Security
 
Requirement checklist
Requirement checklistRequirement checklist
Requirement checklist
 
EDD (Error Driven Development)
EDD (Error Driven Development)EDD (Error Driven Development)
EDD (Error Driven Development)
 
Defect MgmtBugDay Bangkok 2009: Defect Management
Defect MgmtBugDay Bangkok 2009: Defect ManagementDefect MgmtBugDay Bangkok 2009: Defect Management
Defect MgmtBugDay Bangkok 2009: Defect Management
 
Consulting
ConsultingConsulting
Consulting
 
Agile Mumbai 2019 Conference | Intelligent DevOps enabling Enterprise Agilit...
Agile Mumbai 2019 Conference |  Intelligent DevOps enabling Enterprise Agilit...Agile Mumbai 2019 Conference |  Intelligent DevOps enabling Enterprise Agilit...
Agile Mumbai 2019 Conference | Intelligent DevOps enabling Enterprise Agilit...
 
ISTQBCH1 Manual Testing.pptx
ISTQBCH1 Manual Testing.pptxISTQBCH1 Manual Testing.pptx
ISTQBCH1 Manual Testing.pptx
 
So You Just Inherited a $Legacy Application… NomadPHP July 2016
So You Just Inherited a $Legacy Application… NomadPHP July 2016So You Just Inherited a $Legacy Application… NomadPHP July 2016
So You Just Inherited a $Legacy Application… NomadPHP July 2016
 
RSA 2015 Blending the Automated and the Manual: Making Application Vulnerabil...
RSA 2015 Blending the Automated and the Manual: Making Application Vulnerabil...RSA 2015 Blending the Automated and the Manual: Making Application Vulnerabil...
RSA 2015 Blending the Automated and the Manual: Making Application Vulnerabil...
 
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
 
Software Bugs A Software Architect Point Of View
Software Bugs    A Software Architect Point Of ViewSoftware Bugs    A Software Architect Point Of View
Software Bugs A Software Architect Point Of View
 
01 fundamentals of testing
01 fundamentals of testing01 fundamentals of testing
01 fundamentals of testing
 
Shravan kumar vanamala
Shravan kumar vanamalaShravan kumar vanamala
Shravan kumar vanamala
 
Security engineering 101 when good design & security work together
Security engineering 101  when good design & security work togetherSecurity engineering 101  when good design & security work together
Security engineering 101 when good design & security work together
 

More from Marjan Nikolovski

Built to last javascript for enterprise
Built to last   javascript for enterpriseBuilt to last   javascript for enterprise
Built to last javascript for enterprise
Marjan Nikolovski
 
Enterprise js pratices
Enterprise js praticesEnterprise js pratices
Enterprise js pratices
Marjan Nikolovski
 
Skyrocketing to the cloud with Windows Azure
Skyrocketing to the cloud with Windows AzureSkyrocketing to the cloud with Windows Azure
Skyrocketing to the cloud with Windows AzureMarjan Nikolovski
 
Band of brothers, building scalable social web apps on windows azure with asp...
Band of brothers, building scalable social web apps on windows azure with asp...Band of brothers, building scalable social web apps on windows azure with asp...
Band of brothers, building scalable social web apps on windows azure with asp...
Marjan Nikolovski
 
No sql - { If and Else }
No sql - { If and Else }No sql - { If and Else }
No sql - { If and Else }
Marjan Nikolovski
 
Anti Corruption Layers
Anti Corruption LayersAnti Corruption Layers
Anti Corruption Layers
Marjan Nikolovski
 
Entity Framework 4
Entity Framework 4Entity Framework 4
Entity Framework 4
Marjan Nikolovski
 

More from Marjan Nikolovski (8)

Built to last javascript for enterprise
Built to last   javascript for enterpriseBuilt to last   javascript for enterprise
Built to last javascript for enterprise
 
Enterprise js pratices
Enterprise js praticesEnterprise js pratices
Enterprise js pratices
 
Skyrocketing to the cloud with Windows Azure
Skyrocketing to the cloud with Windows AzureSkyrocketing to the cloud with Windows Azure
Skyrocketing to the cloud with Windows Azure
 
Band of brothers, building scalable social web apps on windows azure with asp...
Band of brothers, building scalable social web apps on windows azure with asp...Band of brothers, building scalable social web apps on windows azure with asp...
Band of brothers, building scalable social web apps on windows azure with asp...
 
No sql - { If and Else }
No sql - { If and Else }No sql - { If and Else }
No sql - { If and Else }
 
Anti Corruption Layers
Anti Corruption LayersAnti Corruption Layers
Anti Corruption Layers
 
High Performance Computing
High Performance ComputingHigh Performance Computing
High Performance Computing
 
Entity Framework 4
Entity Framework 4Entity Framework 4
Entity Framework 4
 

Recently uploaded

What is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdfWhat is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdf
kalichargn70th171
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
ShulagnaSarkar2
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
Cost-Effective Strategies For iOS App Development
Cost-Effective Strategies For iOS App DevelopmentCost-Effective Strategies For iOS App Development
Cost-Effective Strategies For iOS App Development
Softradix Technologies
 
How GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdfHow GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdf
Zycus
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Paul Brebner
 
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdfSoftware Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
kalichargn70th171
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
safelyiotech
 
Streamlining End-to-End Testing Automation
Streamlining End-to-End Testing AutomationStreamlining End-to-End Testing Automation
Streamlining End-to-End Testing Automation
Anand Bagmar
 
Secure-by-Design Using Hardware and Software Protection for FDA Compliance
Secure-by-Design Using Hardware and Software Protection for FDA ComplianceSecure-by-Design Using Hardware and Software Protection for FDA Compliance
Secure-by-Design Using Hardware and Software Protection for FDA Compliance
ICS
 
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
Luigi Fugaro
 
Going AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applicationsGoing AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applications
Alina Yurenko
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
Reetu63
 
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
dhavalvaghelanectarb
 
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
widenerjobeyrl638
 
Upturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in NashikUpturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in Nashik
Upturn India Technologies
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
kalichargn70th171
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 

Recently uploaded (20)

What is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdfWhat is Continuous Testing in DevOps - A Definitive Guide.pdf
What is Continuous Testing in DevOps - A Definitive Guide.pdf
 
14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision14 th Edition of International conference on computer vision
14 th Edition of International conference on computer vision
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
Cost-Effective Strategies For iOS App Development
Cost-Effective Strategies For iOS App DevelopmentCost-Effective Strategies For iOS App Development
Cost-Effective Strategies For iOS App Development
 
How GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdfHow GenAI Can Improve Supplier Performance Management.pdf
How GenAI Can Improve Supplier Performance Management.pdf
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
Why Apache Kafka Clusters Are Like Galaxies (And Other Cosmic Kafka Quandarie...
 
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdfSoftware Test Automation - A Comprehensive Guide on Automated Testing.pdf
Software Test Automation - A Comprehensive Guide on Automated Testing.pdf
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
 
Streamlining End-to-End Testing Automation
Streamlining End-to-End Testing AutomationStreamlining End-to-End Testing Automation
Streamlining End-to-End Testing Automation
 
Secure-by-Design Using Hardware and Software Protection for FDA Compliance
Secure-by-Design Using Hardware and Software Protection for FDA ComplianceSecure-by-Design Using Hardware and Software Protection for FDA Compliance
Secure-by-Design Using Hardware and Software Protection for FDA Compliance
 
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
 
Going AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applicationsGoing AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applications
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
 
ppt on the brain chip neuralink.pptx
ppt  on   the brain  chip neuralink.pptxppt  on   the brain  chip neuralink.pptx
ppt on the brain chip neuralink.pptx
 
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024Flutter vs. React Native: A Detailed Comparison for App Development in 2024
Flutter vs. React Native: A Detailed Comparison for App Development in 2024
 
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
美洲杯赔率投注网【​网址​🎉3977·EE​🎉】
 
Upturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in NashikUpturn India Technologies - Web development company in Nashik
Upturn India Technologies - Web development company in Nashik
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 

Marjan.nikolovski down the rabbit hole error handling examined-v01

  • 1. Ready Marjan Nikolovski Father, Dev, CEO/Emit Knowledge Down the rabbit hole Error handling examined try { } // Twitter: @m4rjann // Blog: emitknowledge.com/research-labs
  • 3. Ready Agenda • Error theory; • Error types; • Handling error per type; • Responsible sides; • Error handling strategies; • Error handling for business logic; • Error handling for client; • Error handling for web applications; • Log analytics;
  • 4. Ready ERROR IS AN ANY INTERUPTION THAT STOPS THE SYSTEM TO EXECUTE A BUSINESS CONTEXT
  • 5. Ready A system must have a good strategy when it comes to error handling Most of the code in a solution is trying to handle different types of errors and exceptions It is easy to specify and write code to make the system operable. Hard times come when trying to predict what can go wrong
  • 6. Ready Bugs, issues we can’t predict nor control. Ex: Stackoverflow, Nullpointer... Error types using System; class Program { static void Main() { User appUser = DomainServices.User.GetByUsername(@“marjann”); Console.WriteLine(appUser.Email); } }
  • 7. Ready Error from invalid input. Ex: We expect integer value, the user enters some random characters... Error types using System; class Program { static void Main() { var userIdInput = Console.ReadLine(); int id = int.Parse(userIdInput); Console.WriteLine(id); } }
  • 8. Ready Infrastructural problems. Ex: Missing write permissions on server, full disk, DB not available... Error types using System; class Program { static void Main() { var user = UserRepository.GetByUsername(@”marjann”); Console.WriteLine(user.Email); } }
  • 9. Ready Bugs are system problems that we can’t handle unless we apply a patch. So what types of errors we can handle? Invalid data entry is a system problem that we can handle proactively. If we have infrastructural problems, the system should be able to notify the system administrators.
  • 10. Ready End clients who are using the system. Responsible sides System administrators. Software developers.
  • 12. Ready Global – architectural decision on system level. Error handling strategies Local-contextual – handling errors in a process/method/action.
  • 13. Ready КЛИЕНТ/КОРИСНИЧКИ ИНТЕРФЕЈС БИЗНИС ЛОГИКА ПОДАТОЧНО РЕПОЗИТОРИ АПИ СЕРВИСИ ЕКСТЕРНИ СЕРВИСИ СПРАВУВАЊЕ СО ГРЕШКИ ERROR HANDLING Web/Mobile/Device REST API SERVICES BUSINESS LOGIC DATA REPOSITORY EXTERNAL SERVICES
  • 14. Ready Global perspective of the system. GLOBAL STRATEGY Centralized error handling. We want detailed error instead of wrapped exception. We want execution details. We want unified error messages.
  • 15. Ready GLOBAL STRATEGY Internally, a system should not hide the exceptions. Ex: User.IsExistingUsername(“marjann”) -> DbConnetionException != false Externally, a system should always be transparent and should support unified error information when an error occurs. Ex: Invalid username, Username is not valid!?
  • 16. Ready Say hello to the local context. What if we can retry? Use local context as an exception to the rule! We can’t predict and handle all of the errors, but we must keep the system alive. Exception to the rule: If it does not work fake it!
  • 17. Ready Unification of errors, codes and groups. Error handling for business logic Information about an error(Error Info) against Exceptions. Enrich an error with data for logging aspect.
  • 19. Ready Be transparent and show enough information to the end user. Error handling for client
  • 21. Ready Error message localization. Error handling for web applications Transferring error information back to the app.
  • 23. Ready Who, What, How, Where, When? Log analytics PROM – tool for process mining. We should be able to answer: - How our system is used? - Where our system perform slow? - Parameters of execution? - Patterns of execution?
  • 24. Ready