How i can handle exception in large code like 1000 line
without distrubing the code or without exception handler sction?



How i can handle exception in large code like 1000 line without distrubing the code or without exce..

Answer / Jhamman Lal

[Handling exceptions in large code without disturbing the existing structure] n
1. Logging: Implement a robust logging system to track errors and exceptions that occur during execution. Use a dedicated logging library like Winston, Log4j, or Python's built-in logging module to capture detailed error information.
2. Graceful degradation: Design the application to handle gracefully when an exception occurs by providing alternative paths or default behaviors to ensure minimal disruption to the user experience.
3. Error reporting: Instead of throwing exceptions, create custom error objects that contain relevant information such as error code, message, and stack trace. Use these error objects to provide meaningful feedback to the user or for further analysis.
4. Asynchronous processing: Make use of asynchronous programming techniques like Promises (JavaScript), Future/Promise (Python), or CompletableFuture (Java) to handle errors without blocking the main thread and disrupting the flow of execution.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Oracle General Interview Questions

Which of the following is not a database object TABLESPACE TABLE INDEX NONE

1 Answers  


How would you optimize a slow SQL query?

1 Answers  


what are actual and formal parameters?

1 Answers  


what is the difference between oracle enterprise edition and oracle express edition?

2 Answers  


Write a syntax for update query in oracle?

1 Answers  


What happens if variable names collide with table/column names?

1 Answers  


Do View contain Data ?

10 Answers  


How to export several tables together?

1 Answers  


How to invoke the original export import utilities?

1 Answers  


How to drop a tablespace?

1 Answers  


Can select statements be used on views in oracle?

1 Answers  


Display those managers salary greater than the average salary of his employees?(Based on oracle standard Emp table)

6 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1803)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)