Skip to content

Increase length of error messages#2710

Merged
andrew-platt merged 2 commits intoOpenFAST:rc-4.0.3from
andrew-platt:f/IncreaseErrMsg
Apr 2, 2025
Merged

Increase length of error messages#2710
andrew-platt merged 2 commits intoOpenFAST:rc-4.0.3from
andrew-platt:f/IncreaseErrMsg

Conversation

@andrew-platt
Copy link
Collaborator

@andrew-platt andrew-platt commented Mar 31, 2025

Ready to merge (probably)

Feature or improvement description
The error messages have been far too short for complex messages or messages from FAST.Farm. Increasing it to 2^16 characters (maybe a bit of an overkill) 2^13 characters (8192).

This will result in more memory required for error messages.

In theory this should be enough (cue the "no-one will ever need more than 640k of memory..." quotes from the grey beards)...

Related issue, if one exists
#2701

Impacted areas of the software
The few users that read error messages will see more of the error messages

Additional supporting information
Another option is to increase the ErrMsgLen by a more sane amount and change how we write errors to screen.

Long term we will want to go with @bjonkman's solution - for 5.0.

Test results, if applicable
Output log text from test results may change slightly, but we don't check this data (timestamp always changes during testing).

@bjonkman
Copy link
Contributor

@andrew-platt , I just pushed some code that I have used to capture some of the excessively long error messages in my own code base. Not sure if you want to use this in addition to or instead of your very long error messages, but it's here: d73d812

@deslaughter
Copy link
Collaborator

I think we should go with ErrMsgLen = 8196 which is 8 times as long as the current value. Though I also like @bjonkman's solution.

@andrew-platt
Copy link
Collaborator Author

andrew-platt commented Mar 31, 2025

I agree with @deslaughter. Let's put @bjonkman's solution into v5.0 or 4.1 (see issue #2712). For v4.0.3 we'll do 8196

Copy link
Contributor

@mayankchetan mayankchetan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, Thanks Andy! Let me know if you need help with the error file implementation for v6.0 :P

@andrew-platt andrew-platt merged commit 52987e6 into OpenFAST:rc-4.0.3 Apr 2, 2025
22 checks passed
@andrew-platt andrew-platt mentioned this pull request Apr 8, 2025
34 tasks
@andrew-platt andrew-platt deleted the f/IncreaseErrMsg branch April 17, 2025 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments