Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParseException ToString() does not contain stack trace #716

Closed
codelovercc opened this issue Jun 14, 2023 · 1 comment
Closed

ParseException ToString() does not contain stack trace #716

codelovercc opened this issue Jun 14, 2023 · 1 comment
Assignees
Labels

Comments

@codelovercc
Copy link

1. Description

When a System.Linq.Dynamic.Core.Exceptions.ParseException was thrown, It's hard to locate where cause this exception when I using NLog with layout renderer ${exception}. I'm only can find a line No applicable aggregate method 'Cast(Object)' exists (at index 3) in my log file, but no stack trace, this makes me confused, I know this message means but I don't know where the exception thrown. It takes me a lot of time to find out where goes wrong.

2. Exception

System.Linq.Dynamic.Core.Exceptions.ParseException

Exception message: No applicable aggregate method 'Cast(Object)' exists (at index 3)
Stack trace: NA

I've read System.Linq.Dynamic.Core.Exceptions.ParseException source code and found that ToString() method simply return one line message. Can we change this like the other exceptions do? Thanks :)

@StefH StefH self-assigned this Jun 14, 2023
@StefH StefH changed the title System.Linq.Dynamic.Core.Exceptions.ParseException ToString() does not contains stack trace System.Linq.Dynamic.Core.Exceptions.ParseException ToString() does not contain stack trace Jun 14, 2023
@StefH StefH changed the title System.Linq.Dynamic.Core.Exceptions.ParseException ToString() does not contain stack trace ParseException ToString() does not contain stack trace Jun 14, 2023
@StefH StefH added bug feature and removed bug labels Jun 14, 2023
@StefH
Copy link
Collaborator

StefH commented Jun 14, 2023

@codelovercc

Thanks for this suggestion.

The next version will include InnerException (if present) and a StackTrace.

#717

@StefH StefH closed this as completed Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants