Class ExceptionMapper
java.lang.Object
io.github.dinethdilhara.urltoproduct.exception.ExceptionMapper
Maps internal exceptions to
UrlToProductException.
Provides consistent error responses for consumers of the library.
- Version:
- 1.0.0
- Author:
- Dineth Dilhara
-
Method Summary
Modifier and TypeMethodDescriptionstatic UrlToProductExceptiontoException(Exception e, String url) Converts any exception into a standardizedUrlToProductException.
-
Method Details
-
toException
Converts any exception into a standardizedUrlToProductException.- Parameters:
e- original exceptionurl- input URL- Returns:
- mapped exception
-