27. Centralized Error Handling

The Problem

An ERP may need consistent decisions about whether an error is shown to the user, logged to the console, hidden, or sent to a server.

The Angular Difficulty

Angular has an `ErrorHandler` extension point, but complete ERP error policy still needs notifications, logging, HTTP handling, and optional server reporting.

Angular Approach

@Injectable({ providedIn: "root" })
export class ErrorHandlerService {
    handle(error: unknown) {
        console.error(error);
        // application notification / server reporting
    }
}

MS Approach

ManySet provides a direct runtime-oriented approach for this recurring business-application task.

// Controlled through GlobalConfig.json
// ErrorPopup, ErrorConsole, ErrorDetail, ErrorServerURL
// and ErrorCustomPopupURL define the default policy.
// A component can still handle an error itself when required.

Why this way is useful in business applications :

The comparison is intended to show where ManySet supplies a business-application abstraction around a recurring task, while keeping HTML and JavaScript visible and directly usable.

Key Point :

ManySet reduces the amount of framework-specific composition required for this particular task, without requiring the React/Angular mechanism to be represented as inherently wrong or incapable.