Add dynamic data when sending standalone bug report by mail?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Add dynamic data when sending standalone bug report by mail?
Hello,
Is there a way to dynamically add some infos like the platform - or other data get by script - sent by email when a standalone crashes and the user send a report with LC 9.6.8?
Actually, the only dynamic data received is the LC error message and, of course, the optional message added by the user.
Is there a way to dynamically add some infos like the platform - or other data get by script - sent by email when a standalone crashes and the user send a report with LC 9.6.8?
Actually, the only dynamic data received is the LC error message and, of course, the optional message added by the user.
Re: Add dynamic data when sending standalone bug report by mail?
I'd really like to know that as well - if you do find out please do post it here...
S.
S.
-
- VIP Livecode Opensource Backer
- Posts: 9852
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Add dynamic data when sending standalone bug report by mail?
I made my own error reporting stack that looks and behaves exactly as I like. Trap the errorDialog message to handle errors however you like.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Add dynamic data when sending standalone bug report by mail?
Thanks Richard, that's useful!
I imagine this is one of those generalisable tasks that can easily be shared... I don't suppose anyone knows if some kind soul has released a stack like this?
Creating from scratch is fine, but i keep getting side-tracked from my main projects doing mini side-projects like this
I imagine this is one of those generalisable tasks that can easily be shared... I don't suppose anyone knows if some kind soul has released a stack like this?
Creating from scratch is fine, but i keep getting side-tracked from my main projects doing mini side-projects like this
-
- VIP Livecode Opensource Backer
- Posts: 9738
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Add dynamic data when sending standalone bug report by mail?
Stam.
Craig
I live for those.but i keep getting side-tracked from my main projects doing mini side-projects like this
Craig
Re: Add dynamic data when sending standalone bug report by mail?
Craig,
Don't necessarily disagree and neither to I have developer deadlines etc. But my free time is extremely limited due to (non-programming) work and getting anything done takes months instead of days with all the little detours that crop up.
The detours are fun and educational, but it's getting to the point that it's just eating up my diminishing free time :-/
I'l take a shortcut if i can
Don't necessarily disagree and neither to I have developer deadlines etc. But my free time is extremely limited due to (non-programming) work and getting anything done takes months instead of days with all the little detours that crop up.
The detours are fun and educational, but it's getting to the point that it's just eating up my diminishing free time :-/
I'l take a shortcut if i can
Re: Add dynamic data when sending standalone bug report by mail?
Radical and effective solution, Richard.FourthWorld wrote: ↑Fri Sep 09, 2022 4:59 pmI made my own error reporting stack that looks and behaves exactly as I like. Trap the errorDialog message to handle errors however you like.
Thank you.
Does it work with built-in revmail, or do you prefer to use a custom mail engine mais tsNet?
-
- VIP Livecode Opensource Backer
- Posts: 9852
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Add dynamic data when sending standalone bug report by mail?
I use a custom equivalent of revMail ("launch URL" with the "mailto:" service specifier), for two reasons:Zax wrote: ↑Sat Sep 10, 2022 6:50 amRadical and effective solution, Richard.FourthWorld wrote: ↑Fri Sep 09, 2022 4:59 pmI made my own error reporting stack that looks and behaves exactly as I like. Trap the errorDialog message to handle errors however you like.
Thank you.
Does it work with built-in revmail, or do you prefer to use a custom mail engine mais tsNet?
1. As a user I like having my email in one place, and imagine at least some of my customers do too.
2. When sending info about a user's system I prefer to err on the side of transparency, allowing the user to see exactly what's being sent. Of course they won't understand all of it, but at least they can see I'm not including any personal info, file paths to personal files, or anything else that might compromise their privacy.
LC makes it easy to make dialog windows, and the errordialog message was created for error reporting, so it never struck me as unusual to use the tools provided to deliver the UX I'm looking for. Error handling just struck me as the same sort of thing as making an About box or anything other part of the app.
LC's option for this came along relatively late for me, and while I've used it in a few quickie things the absence of executionContexts (how does one debug without knowing the calling chain?) and system info (platform, version, screen size, disk space, other basics) made it a nonstarter for me.
I'm updating mine for an app I'm upgrading. It's self-contained so "start using" is all that's needed to let it do it's thing. Recipient address is currently a custom prop, but now that I have some clients where we route those to automated mail handling I'll add an init message to set recipient and possibly other details. When I get that done I can share it is it's useful.
But I'm not sure how many would use it. I see a great many messages in our community with raw error info provided, suggesting relatively few are even using LC's error dialog.
One of the reasons GBs of tooling on my HD haven't yet been shared is justifying the time for documentation and more thorough error checking. Like Steven McConnell says in "Code Complete":
I love LC but the audience is small. Donations for things like my devolution toolkit are much appreciated and have covered a couple of dinners out, but haven't yet been enough to justify time away from client work to integrate some of the other tooling floating around my drives like project metrics (static analysis for identifying complexity using the McCabe Index algo adapted for xTalk characteristics, global var and general calling chain patterns, etc.), versioning (diff and merge for binary stack files), and template stacks (like error handing, About, list picker, basic dialog template, and other generic essentials).The difference between a tool and a product is that with a tool it need only be necessary to use it correctly, but with a product it should be impossible to use it incorrectly.
But on the other hand, one upside to a small audience is that expectations for completeness are lower. So I'll see if I can get that error dialog sharable when I can get back to it soon.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Add dynamic data when sending standalone bug report by mail?
Thanks Richard, i had no idea executionContexts even existed - the entry in the dictionary was very helpful.
-
- VIP Livecode Opensource Backer
- Posts: 9852
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Add dynamic data when sending standalone bug report by mail?
It's a godsend for attempting to understand vague recipes from end-users. The executionContexts has saved me many thousands of $ in what would have been lost time trying to track down issues without it.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- VIP Livecode Opensource Backer
- Posts: 136
- Joined: Tue Feb 23, 2010 10:53 pm
- Location: Saint Louis, Missouri USA
Re: Add dynamic data when sending standalone bug report by mail?
Here is my attempt.by FourthWorld » Fri Sep 09, 2022 10:59 am
... Trap the errorDialog message to handle errors however you like.
(Note that limited HTML formatting is permissible in the error dialog) Put the following script into a button and run it.
Code: Select all
on mouseUp pButtonNumber
--force an error:
put "abc" into field "no such field" --message box
end mouseUp
on errorDialog pExecutionError, pParseError
put item 2 of line 1 of pExecutionError into tErrorLine
put line (item 1 of line 1 of pExecutionError) of the scriptExecutionErrors into tErrorType
put "<p><u>" before tErrorType
put "</u></p>" after tErrorType
put "<p></p><p>the platform: <b>" & the platform & "</b></p>" & return into tDiagnostics
put "<p>the machine: <b>" & the machine & "</b></p>" & return after tDiagnostics
put "<p>the systemVersion: <b>" & the systemVersion & "</b></p>" & return after tDiagnostics
put "<p>the processor: <b>" & the processor & "</b></p>" & return after tDiagnostics
put "<p>the stack file version: <b>" & the version & "</b></p>" & return after tDiagnostics
put "<p>the build number: <b>" & the buildNumber & "</b></p>" & return after tDiagnostics
put "<p>the environment: <b>" & the environment & "</b></p>" & return after tDiagnostics
put "file:///Users/robertcole/Desktop/BC%20head.jpg" into tSource
put "<p><img src=tSource></p>" & return after tDiagnostics
answer "An <b>error</b> occurred on line: " & \
tErrorLine & return \
& tErrorType & return \
& tDiagnostics
put pExecutionError into message box
end errorDialog
Bob
Re: Add dynamic data when sending standalone bug report by mail?
That looks pretty good Bob, thank you for sharing!
-
- VIP Livecode Opensource Backer
- Posts: 136
- Joined: Tue Feb 23, 2010 10:53 pm
- Location: Saint Louis, Missouri USA
Re: Add dynamic data when sending standalone bug report by mail?
I forgot to mention that the Development -> Script Debug Mode
must be unchecked (no debugging) for the script to display the error dialog.
Bob
must be unchecked (no debugging) for the script to display the error dialog.
Bob
Re: Add dynamic data when sending standalone bug report by mail?
I made this error report stack.
It has to be a substack and its script inserted into front at startup.
It hasn't been heavily tested. It uses revMail command because I haven't been able to get URL mailto protocol to work.
Like Bob, I haven't tried to deal with executionContexts.
It produces a mail like this:
NB:
- release date and Prefs file are specials data used in my libs.
- the email address can be provided by this stack's custom property the EmailAdress, or dynamically defined in this stack's script with errorDialog_getMailAddress function.
It has to be a substack and its script inserted into front at startup.
It hasn't been heavily tested. It uses revMail command because I haven't been able to get URL mailto protocol to work.
Like Bob, I haven't tried to deal with executionContexts.
It produces a mail like this:
Code: Select all
An error occurred with ' Beleaguered Castle'.
-------------------------- ERROR --------------------------
Handler: mouseup
Line: 2 --> goToCard
Control: button id 27021 of group id 26662 of card id 1058 of stack "/Users/PERSO/Dev/LiveCode/Beleaguered Castle/BeleagueredCastle 0.16.livecode"
----------------------- ENVIRONMENT -----------------------
Beleaguered Castle
Release date:
Engine: 9.6.8
Prefs file:
Machine: MacBookPro8,3
Processor: x86_64
OS: MacOS
System version: 10.12.6
---------------------- USER COMMENTS ----------------------
I do nothing, I swear!
- release date and Prefs file are specials data used in my libs.
- the email address can be provided by this stack's custom property the EmailAdress, or dynamically defined in this stack's script with errorDialog_getMailAddress function.