Exception Clarity Improvement #648
Unanswered
tofanpetru
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Hello @tofanpetru.
The error you showed occurs after the main work, outside of the Mapster Code itself. Сan wrap in try-catch blocks. The place where the function itself is called is in the adapter. But then you will only receive data about the top-level types transferred for processing.
Such try-catch blocks are not created in the Conversion function itself. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone!
I would like to receive some advice. How can I make the result of an exception much clearer? For example, what values and properties caused the exception?
The ultimate goal is to log this message to be much more user-friendly and clear. Because the application is running somewhere and it's very difficult to investigate
Let's assume that Mapster will throw an exception if it performs an incorrect conversion.
![img1](https://private-user-images.githubusercontent.com/13838191/277912046-cd3ec2ef-88a5-4caa-a4d6-968c3f61999f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1ODUxMDAsIm5iZiI6MTczOTU4NDgwMCwicGF0aCI6Ii8xMzgzODE5MS8yNzc5MTIwNDYtY2QzZWMyZWYtODhhNS00Y2FhLWE0ZDYtOTY4YzNmNjE5OTlmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAyMDAwMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdjMzU2MTkwNDg3NjNiNDhjZGViOTZiOTQ5M2Y2YmQ3MTZjNWIzMTA3OTdkYWQ5ZTYzOTlmMjZlYzFiMmI3OTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.g9ATeHEgBAnsEn9qSuYWi-xe6q_6zBmQ6YlkQV3F484)
Beta Was this translation helpful? Give feedback.
All reactions