Before posting, and to avoid disappointment, please read the following:

  • This forum is not for 2BrightSparks to provide technical support. It's primarily for users to help other users. Do not expect 2BrightSparks to answer any question posted to this forum.
  • If you find a bug in any of our software, please submit a support ticket. It does not matter if you are using our freeware, a beta version or you haven't yet purchased the software. We want to know about any and all bugs so we can fix them as soon as possible. We usually need more information and details from you to reproduce bugs and that is better done via a support ticket and not this forum.

Basic Try/Catch ?

For technical support visit https://support.2brightsparks.com/
Post Reply
bigGuitar
Enthusiastic
Enthusiastic
Posts: 15
Joined: Sat Aug 20, 2022 1:21 pm

Basic Try/Catch ?

Post by bigGuitar »

The documentation states that you can use try/catch with Basic scripts, however, Catch seems to be an unrecognized keyword, although Try is recognized.

Had anyone else attempted this?
bigGuitar
Enthusiastic
Enthusiastic
Posts: 15
Joined: Sat Aug 20, 2022 1:21 pm

Re: Basic Try/Catch ?

Post by bigGuitar »

So as far as I can tell, you CANNOT use Try/Catch/Try End within 'Basic' v10 for Syncback, it simply does not support it despite what is defined in the documentation. You cannot use any flavor of 'On Error' either for error handling under the latest Syncback Basic.

With Pascal under Syncback, I found that you can perform a Try/Except/end, however, it seems that you cannot actually capture any Exception messages or other exception details within the Try statements, such as with "On E:", so everything's scaled back as far as the scripting capabilities go. The lack of proper error handling is certainly a concern. It seems it would be best to define my own Programs 'Before and After' (likely with powershell), to try to handle issues for which the Syncback script would be too weak. Alternatively, perhaps importing some DLL files would provide the functionality to perform what is desired.
Kostas
2BrightSparks Staff
2BrightSparks Staff
Posts: 421
Joined: Thu Sep 18, 2014 2:08 am

Re: Basic Try/Catch ?

Post by Kostas »

Ηι,

Maybe these topics in the script engine's developer Support Center can illustrate and clarify how to do it:

https://support.tmssoftware.com/t/on-e- ... ort/2308/2
https://support.tmssoftware.com/t/how-t ... ion/2488/2
https://support.tmssoftware.com/t/excep ... ess/2323/3

Thanks,
Kostas
[2bs]
bigGuitar
Enthusiastic
Enthusiastic
Posts: 15
Joined: Sat Aug 20, 2022 1:21 pm

Re: Basic Try/Catch ?

Post by bigGuitar »

Thank you, however, "On E:" is not handled properly or recognized properly by the Syncback implementation of Pascal, which is my point that these are 'scaled back' versions of the scripting languages that can only handle so many commands.
bigGuitar
Enthusiastic
Enthusiastic
Posts: 15
Joined: Sat Aug 20, 2022 1:21 pm

Re: Basic Try/Catch ?

Post by bigGuitar »

Ok sorry, I see those links were their 'workarounds' for the "on e:" limitations... thank you.
Post Reply