Open Germenzi opened 3 weeks ago
You can use Engine.print_error_messages = false
before any method call that may print an error, then Engine.print_error_messages = true
just after. (Remember to always set it back to true
after!)
You can use
Engine.print_error_messages = false
before any method call that may print an error, thenEngine.print_error_messages = true
just after. (Remember to always set it back totrue
after!)
I didn't know about that, but it still doesn't work with the Error
tab in the editor where these erros appears (sorry, I didn't make myself clear when I used the word print
), so, unfortunatly, the problem still actual.
And in general, given the blocking behavior of the function StreamPeerTCP.get_var()
, it would be to great have an ability to check can I get this var without blocking (it can be forever because of attacks).
P.S. Also maybe Its good idea to make the same option for making such errors not to be "printed"? Is it possible?
Describe the project you are working on
N / A
Describe the problem or limitation you are having in your project
I am using
StreamPeerTCP
to communicate, and when usingget_var
, the main thread may be blocked forever. To avoid that, I use internalPackedByteArray
to store the data peer already recieved and then check this data withPackedByteArray.has_encoded_var(0)
.This method should expect that data may be incomplete, so I don't want to see many errors when var isn't recieved completely.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Don't print any errors if var decoding failed.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Example::
If this enhancement will not be used often, can it be worked around with a few lines of script?
N / A
Is there a reason why this should be core and not an add-on in the asset library?
N / A