New Script Step named something like: LogScriptStep

Idea created by TonyWhite on Nov 5, 2015
    Active
    Score1
    • Markus Schneider

    A script step that could be placed before or after a target script step that would:

    • Set error capture on
    • Trap and Log the error (or just the timestamp with milliseconds) from the target script step
    • Restore error capture state

    Now sure what might be the best name. Here I am using LogScriptStep as a place holder

    Signature: LogScriptStep [LogWhere ; ActionIfError ; “CustomText”]
    LogWhere:

    • c=client
    • s=FMS
    • f=FileMaker table
    • e=smtp email

    ActionIfError (callback):

    • Script Step {for example Halt Script(s)}
    • Script

    Example: LogScriptStep [“cs” ; “Halt Script” ; “Hello World”]


    Sample Output (Logged to c=Client and s=FMS and many other results without requiring user input)
    ErrorType|ErrorCode|cs|Halt Script|“Get(FileName)”|“Get(ScriptName)”|“Get(ScriptLine)”|StackTrace;S1:s2|OtherGetFunctions TBD|“Hello World”

    Use Cases:
    1. Error Trap and Log/Alert with less effort and fewer lines
    2. Performance measurement

    Goals:

    • Minimize the number of lines required (goal is 1 line that is placed before or after the target script step)
    • Minimize the number of parameters (i.e. auto detect FileName, ScriptName, etc.)
    • Easy to parse output
    • Readable code
    • Trap all errors of all types (Regular, ODBC, Tony’s ;-), other, etc.)



    There are 2 other similar Product Ideas that I have seen that people might want to look at:

    Logging all script errors

    Set Log [ (message) ; {OS} ] Script Step