5.0 Beta1 will swallow exceptions
See original GitHub issueI have the following mapper configuration
mapping.ForMember(model => model.Type, e => e.ResolveUsing(dto => GetPropertyType(dto)));
And the implementation of GetPropertyType
throws an InvalidArgumentException sometimes:
private static PropertyAmenityTypeEnum GetPropertyType(PropertyAmenityDto dto)
{
if (Enum.IsDefined(typeof (PropertyAmenityTypeEnum), dto.Type))
{
return (PropertyAmenityTypeEnum) dto.Type;
}
throw new InvalidArgumentException("Invalid amenity type");
}
I have a test that checks that the mapper is throwing a AutoMapperMappingException
on o invalid type that is passing in v4 and failing on the latest beta release.
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Release Notes for Flyway Engine
If Flyway encounters a SQL exception while Oracle Spool is set, the error information is now written to the Spool output. Bug fixes....
Read more >Is it OK to swallow all exceptions except the critical ones in ...
It's okay to swallow specific exceptions in particular cases, but in practice it depends on the use case. I recommend handling exceptions, you ......
Read more >PHP 5 ChangeLog
Fixed bug #69740 (finally in generator (yield) swallows exception in iteration). Fixed bug #69835 (phpinfo() does not report many Windows SKUs). Fixed bug...
Read more >Concurrency and exceptions
A catch block that swallows an exception (today) is just about guaranteed—asynchronous exceptions aside—that the IP will soon reach the next ...
Read more >Do Not Swallow The Exceptions
Throwing away exceptions in your code is just a bad practice and makes it harder to support your application. It may make it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Catching nothing is clearly better if you ask me. We’ll just have to see how people react 😃
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.