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

Rule0044AnalyzeTransferFields - unhandled cast exception from OptionValuesSyntax to GlobalVarSectionSyntax #774

Open
a-gnius opened this issue Sep 24, 2024 · 1 comment
Labels
bug Something isn't working question Further information is requested

Comments

@a-gnius
Copy link

a-gnius commented Sep 24, 2024

We receive the following error:

Unhandled exception. System.InvalidCastException: Unable to cast object of type 'Microsoft.Dynamics.Nav.CodeAnalysis.Syntax.OptionValuesSyntax' to type 'Microsoft.Dynamics.Nav.CodeAnalysis.Syntax.GlobalVarSectionSyntax'.
   at BusinessCentral.LinterCop.Design.Rule0044AnalyzeTransferFields.FindGlobalVariables(SyntaxNode node)
   at BusinessCentral.LinterCop.Design.Rule0044AnalyzeTransferFields.AnalyzeTransferFields(OperationAnalysisContext ctx)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

As I understand it is something with TransferFields and Option values. Any idea what we should look for?

@Arthurvdv Arthurvdv added the bug Something isn't working label Oct 8, 2024
@Arthurvdv
Copy link
Collaborator

I've did some improvements and error handling on this rule with a few weeks ago. and with the release of v0.31.2 of the LinterCop I'm hoping this has now resolved this issue.

Could you check again and let me know if this issue now has been resolved?

@Arthurvdv Arthurvdv added the question Further information is requested label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants