Announcement

Collapse
No announcement yet.

Im Back -> "Exception has been thrown..."

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Kbevo
    replied
    Originally posted by JimSpy View Post

    To strain the comparison further, if I may paraphrase...

    "What's confusing you is just the nature of my syntax!"
    Yes Jim! Good catch. The name of that song is certainly appropriate for this "bug".

    Gary

    Leave a comment:


  • JimSpy
    replied
    Originally posted by Kbevo View Post


    I guess I will start ripping code out to see if I can find what it does not like. That cryptic error message reminds me of a verse from an old Stones song. If I may para-phrase, "Pleased to meet you, hope you guess where your error is".



    Gary
    To strain the comparison further, if I may paraphrase...

    "What's confusing you is just the nature of my syntax!"

    Leave a comment:


  • santoal
    replied
    Originally posted by Kbevo View Post
    Found It.. finally

    In case some other unfortunate soul get this error and stumbles across this thread; it was painful but I found what the (HST) Compiler did not like. In my Global declarations I had two statements:
    Dim strInFS = hs.DeviceStringByName("GDSPublicPath") & "\VWS-Data\csv\data.csv"' File Spec to input file
    Dim strDvFS = hs.DeviceStringByName("GDSPublicPath") & "\VWS-Data\schema\VWSData.csv"' File Spec to VWS Devices file

    Obviously (now), I had forgotten to put "As String" before the equal. Except that was not causing this problem. The problem (it seems) is those statements must be inside a Sub/Function. Clearly something peculiar to the HST compiler implementation because they work fine within tenScripting3.

    Gary

    Thanks Kbevo
    I am that unfortunate soul.

    I found the offending variables, set in the sub and all fixed.

    Leave a comment:


  • Kbevo
    replied
    Found It.. finally

    In case some other unfortunate soul get this error and stumbles across this thread; it was painful but I found what the (HST) Compiler did not like. In my Global declarations I had two statements:
    Dim strInFS = hs.DeviceStringByName("GDSPublicPath") & "\VWS-Data\csv\data.csv"' File Spec to input file
    Dim strDvFS = hs.DeviceStringByName("GDSPublicPath") & "\VWS-Data\schema\VWSData.csv"' File Spec to VWS Devices file

    Obviously (now), I had forgotten to put "As String" before the equal. Except that was not causing this problem. The problem (it seems) is those statements must be inside a Sub/Function. Clearly something peculiar to the HST compiler implementation because they work fine within tenScripting3.

    Gary

    Leave a comment:


  • Kbevo
    replied
    Originally posted by tenholde View Post
    Have you tried running the script from a manual event to see if any helpful errors are written to the HS3 log?

    tenholde
    Thanks for the suggestion tenholde, I can use all the guidance I can get. Unfortunately, it does not appear much different:
    Feb-16 12:41:19 PM Error Compiling script C:\Homeseer_HS3Pro\scripts\GDS_VWS_Data.vb: Exception has been thrown by the target of an invocation.
    Feb-16 12:41:19 PM Event Running script and waiting: C:/Homeseer_HS3Pro/scripts/GDS_VWS_Data.vb("CreateGDat")
    Feb-16 12:41:19 PM Event Event Trigger "Utilities Manual-Call"
    Feb-16 12:41:19 PM Event Event Utilities Manual-Call triggered by the event page 'Run' button.

    I guess I will start ripping code out to see if I can find what it does not like. That cryptic error message reminds me of a verse from an old Stones song. If I may para-phrase, "Pleased to meet you, hope you guess where your error is".

    I do want to thank you for your excellent tenScripting3 HS3 debugging tool, without it I seriously doubt I would even attempt a HS2 to HS3 migration. I really thought postponing the migration for 3 years and waiting for HS3 to mature, it would be easier.

    Gary

    Leave a comment:


  • tenholde
    replied
    Have you tried running the script from a manual event to see if any helpful errors are written to the HS3 log?

    tenholde

    Leave a comment:


  • Kbevo
    started a topic Im Back -> "Exception has been thrown..."

    Im Back -> "Exception has been thrown..."

    When I execute the following statement in my HS3 Startup.vb script:
    hs.RunScriptFunc("GDS_VWS_Data.vb", "CreateGDat", "", True, True)

    I get an error:
    Feb-15 05:23:32 PM Error Compiling script GDS_VWS_Data.vb: Exception has been thrown by the target of an invocation.

    As the error suggests, the problem occurs during compilation and never gets to the execution. I have no idea what in GDS_VWS_Data.vb is causing the error. The program compiles clean and the Function executes fine when using tenScripting3 (VS 2013). Anyone seen this error or have any suggestions on how to get more information on what is causing it?

    Thanks
    Gary


    Last edited by Kbevo; February 17, 2016, 04:31 PM.
Working...
X