Flexy Error (33) File not Found

Hello again,

I have another question. I want to maintain errors in a separate log file, that I can write to upon seeing an error.

When an error occurs, the error code and a description of the error is displayed to the console.

Is there an associated variable with the text which is displayed.

For example,

Error (33) File not Found.

I want a variable that holds the string “File not Found” - or something like that.

Then I would write the timestamp, error code, and description to a file I will push to an FTP server.

Right now I can do the timestamp and error code, but having that extra text field would make it easier when sorting through the logs.

I want to do this manually so I can just log the errors which are important to me.

Thank you,

Dan

Hi Daniel,

You can create an entire custom file where you open then append to it. This allows for your own strings to be inserted. See the following topic, it is for a custom historic log but you can skip the variable part but use the same process for a custom error log file. HOW TO: Create a custom historical log file in BASIC

Is this the process you are using now?

Deryck

Yes I understand how to do this - the main point in my question is how to address that specific piece of information - the string containing the error line to the console. I am figuring if it is able to displayed to the console, it must be coming from somewhere. The question is whether I have access to that somewhere, and if so how?

Thank you again,

Dan

When you refer to the console are you referring to the event log page? This page is loading a file of the events that occur there isn’t a way to intercept these errors and have them print else where but you can request the file then check it for an event. We have this example that opens the event logs then look for the esync event. You could replace the event for esync and look for the file not found event.

Deryck

Hey again,

By the console, I mean the ‘console’ window that is part of the BASIC IDE. I have included a screen capture for clarity.

In the screenshot, the console is displaying print statements that I have been using for dev work, but when an error occurs it is also displayed here.

Thanks again for your help,

Dan

Silly me forgot the attachment.

Even so, that would not solve my problem - as the data I am after is autogenerated to the console, not manually printed. It just appears in the same window.

Thanks anyways.

Could you send me your Basic scripting or a backup of the Flexy so I can fully review what you are doing. We don’t have a way to pull from the IDE console but you should be able to print to the file rather then the console.

Deryck

Hi @Daniel_Travis,

It is hard to fully understand your issue with out your source code but it sounds like your underlying issues is the same as this: https://techforum.ewon.biz/thread-387.html

You might be able to use the FS “touch” command and check that response to avoid the entire issues. see section 3.27.2 of the Programming guide.

Deryck

Hi Daniel,

Since this issue has diverged away from the previous topic i have moved it over to a new one. Let me know if you still have any additional questions.

Deryck

Topic closed due to inactivity.