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 React Difficulty

React does not prescribe a complete application-wide error presentation policy. Teams combine error boundaries, logging libraries, API interceptors, and notification components.

React Approach

class ErrorBoundary extends React.Component {
    componentDidCatch(error) {
        console.error(error);
        // application-specific reporting
    }

    render() { return this.props.children; }
}

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.