Error Suppression vs Graceful Degradation
Developers should use error suppression cautiously in scenarios like testing where expected errors occur but shouldn't halt execution, or when dealing with legacy code that generates non-critical warnings meets developers should learn and apply graceful degradation when building applications that need to support a wide range of users, such as in enterprise environments, public websites, or regions with varying internet speeds and device capabilities. Here's our take.
Error Suppression
Developers should use error suppression cautiously in scenarios like testing where expected errors occur but shouldn't halt execution, or when dealing with legacy code that generates non-critical warnings
Error Suppression
Nice PickDevelopers should use error suppression cautiously in scenarios like testing where expected errors occur but shouldn't halt execution, or when dealing with legacy code that generates non-critical warnings
Pros
- +It's also useful in production for handling edge cases where errors are tolerable, such as failing to load optional resources
- +Related to: error-handling, debugging
Cons
- -Specific tradeoffs depend on your use case
Graceful Degradation
Developers should learn and apply graceful degradation when building applications that need to support a wide range of users, such as in enterprise environments, public websites, or regions with varying internet speeds and device capabilities
Pros
- +It is crucial for ensuring accessibility compliance, improving user experience in fallback scenarios, and maintaining functionality during network issues or browser incompatibilities, often used alongside progressive enhancement strategies
- +Related to: progressive-enhancement, web-accessibility
Cons
- -Specific tradeoffs depend on your use case
The Verdict
Use Error Suppression if: You want it's also useful in production for handling edge cases where errors are tolerable, such as failing to load optional resources and can live with specific tradeoffs depend on your use case.
Use Graceful Degradation if: You prioritize it is crucial for ensuring accessibility compliance, improving user experience in fallback scenarios, and maintaining functionality during network issues or browser incompatibilities, often used alongside progressive enhancement strategies over what Error Suppression offers.
Developers should use error suppression cautiously in scenarios like testing where expected errors occur but shouldn't halt execution, or when dealing with legacy code that generates non-critical warnings
Disagree with our pick? nice@nicepick.dev