Skip to main content

All Questions

0 votes
1 answer
265 views

How to correctly extend runtime exception?

We have a GraphQL server which sends data to the front end client. We have other tenants who will use our sever and host their code. I want to create a system where they all can create any custom ...
user415612's user avatar
-1 votes
2 answers
913 views

Where to place exception handling while using Decorator design pattern

How to design a service layer structure that will be resistant to exceptions. Let's say I have a simple OrderService service, this service performs basic operations - saving an order. public interface ...
jnemecz's user avatar
  • 299
1 vote
2 answers
163 views

Is passing an ErrorMessage to be populated inside the receiving method an anti-pattern?

I come from a Java background, and my colleague is from .NET. We are working on a Java project and I saw him create a method like this: public Object myMethod(Object[] param1, ErrorMessage ...
lemuel's user avatar
  • 131
-1 votes
1 answer
892 views

Best practice for handling many exceptions

I have Java microservice that exposes multiple APIs. Under each API there are many exceptions could be thrown. The last method that catches them all has big catch block ... catch(exc1 e1 | exc2 e2 | ...
Hawk's user avatar
  • 487
2 votes
3 answers
808 views

Layering Design Pattern in Java clean code style

As a Java developer, I am developing trying to use the clean code rules. But in my team we are facing a concrete problem: We have a business layer offering a service called "createObject", this ...
zeraDev's user avatar
  • 121
2 votes
1 answer
1k views

Central Exception Handler

Recently I've been thinking about a general ExceptionHandler, that I could initialize once in my app context and inject it everywhere. The idea that it will have quite simple interface with just ...
J-unior's user avatar
  • 189