1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to? Handle errors in both a general and "complete" way...

Discussion in 'Support' started by mathewsdw, Feb 8, 2012.

  1. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    I'm going start with a rather-long preface (which is probably quite "emotional" due to my extreme frustration at the moment and you may feel free to "skip" it if you like) to what will be an ultimately rather-short question by stating exactly what the fundamental issue(s) here are (I'm rather sure I've mentioned much if not all of this before on this forum, but I really don't remember - read just a little bit further on): Because of my general incompetence due to both my extremely bad memory (I'm not just saying that, it is a formally, medically-diagnosed condition that at this moment is not even slightly humorous) and very poor vision it takes me literally hours to accomplish even the simplest task (I used to be a very good C++ programmer - I tied for the second-highest score ever up to that point in time on a C++ "certification" exam administered by Microsoft (and this was a two hour test that I finished in about 45 minutes!) - but I've basically "given up" on writing C++ at all due to my incompetence), and I don't really understand this (as of this moment it has taken me more than two and a half hours to compose and enter this posting - but I added the immediately previous just before hitting the "Create Thread" button now that I'm going over it looking for errors of various kinds) but I'm also now a rather poor typist in literally every possible way (my typing teacher in high school told me that I was both the fastest and most accurate typist he had ever seen - but before you think I'm bragging too much I will make it clear here that other than those two things I have had for basically my whole life a significant number of extreme deficits - I could essentially not do things at all that almost every other human being did so easily that they didn't even think about them - and to give you some idea of the magnitude of what I am talking about, I decided (I mean an actual, "hard", totally non-negotiable decision, not an "I don't think...") before the age of 10 that I would absolutely not have any biological children and take any chance whatsoever of having them inherit any of these things - a decision that I have totally "stuck to" without any regrets whatsoever other than the rather-sad fact that it was almost certainly the right decision) that I used to do in an hour or two can now take me a week or more to accomplish.

    And I am also totally dependent on this computer in a very large number of ways - it is, to a very large degree, my memory and, quite ironically, I think , I can not write (penmanship) at all other than some "scratches" that are "supposed" to be my signature, so I do literally everything on the internet (e-mails, keeping track of my finances and paying my bills - I haven't even owned a physical checkbook in probably 20 years or more but I do have a "checking account" that I access strictly via a debit card) and I "automate" as many "important" things as I possibly can because the chances of me making a very significant error that I will find difficult if not impossible to "recover" from (I will give you some idea of the kind of thing I am talking about here: in the last week or so I spent a quite large amount of time writing a "program" (batch file) to automate something that I absolutely have to do and I screw-up on a regular basis creating big hassles in my life which I really don't need, and then I "got involved" in something else that I felt had an even higher priority that took me a couple of days to finish, and when I finished that (it took me roughly two and a half days and it should have taken me only and hour or two at most) and then tried to go back to finish the previously-mentioned, almost-complete, batch file I couldn't find it, and I spent several hours looking for it - a mystery that at the moment that has not yet been at all resolved) so I have made a largely-successful (thanks to Rex) other than my slowness transition to replacing C++ programs with batch files. And I want to make something perfectly clear here: I literally could not survive on my own without this computer and the internet and those "programs", and in the past two weeks when I've been "socializing" with 3 close women friends I mentioned to them how many problems I have been having lately due to these issues and all three of them basically made comments to the effect of "If it wasn't for your computer skills you would have been institutionalized years ago." (I worked either with or for or both of all three of them, so they are totally familiar with what my skills in this area used to be).

    So here (finally!) is the question: TCC's batch files (because of its "compatibility" with cmd.exe from what I understand) continue executing by default when they encounter an error, which is unlike any other computer language I've ever dealt with in the past (I really don't consider cmd.exe's batch file language to really be a "language" at all) and is a totally unacceptable to me due to the great number of errors that I make on a relatively-constant basis. And if I put an "On Error" anything to cause the batch file to stop executing in these (highly likely cases) I "lose" what the error actually was, which is even more unacceptable to me. So the question is actually rather simple: How to I write a "On Error something" that both reports the error (whatever its source, TCC batch file language itself, an "internal" command, an "external" command (program or batch file), Windows API function, whatever else you can think of), and then terminates the batch file. (Having my cake and eating it, too!)

    - Dan
     
  2. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,312
    Likes Received:
    39
    What happens if you use ON ERRORMSG instead of ON ERROR?
     
  3. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    Thank you very much, Charles, it would appear (I haven't tested it yet) that that is the solution. This is just yet another example of both my bad memory (I had a dim recollection of having seen it before when you reminded me of it), and my bad eyes (I find the "help"pages to be quite difficult to read because, unlike web pages (Ctrl+), I don't know of any way to magnify their contents so that I am totally reliant on the native Windows "Magnify" app, which has (by its very nature) a very-limited "field of view"). And I think I suggested that I thought that there very likely was a "very easy" solution, and that is it! :)

    - Dan
     
  4. Frank

    Joined:
    Aug 2, 2011
    Messages:
    258
    Likes Received:
    4
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,870
    Likes Received:
    83
    :)

    You can always use the web (browser-based) help instead of the local html (.chm) help. The web help content is identical to the html help, but it's located on our server and displayed using your browser, so you can magnify it however you want. See http://jpsoft.com/help.
     
  6. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,312
    Likes Received:
    39
    In the current version, you can even
    Code:
    option //webhelp=yes
    
     
  7. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    Thanks to all of you, guys!!! I downloaded the PDF file into Firefox, but for Firefox Windows "told" me that "the program is not responding" after waiting about 15 minutes so I "killed" it and tried Internet Explorer, and it wouldn't do anything at all when I tried to go to JPSoft.com (I had to terminate it also using the Task Manager), tried Safari and it told me "Problem with Shortcut: The parameter in incorrect" which is really strange since I have absolutely never done anything with the Safari shortcut myself, finally tried Opera and I was actually able to download and save it. So thank you, Frank. And as far as the strictly-off-the-web based help goes, I'll try it out and see whether I like "local" help (i.e., the PDF file) or entirely web-based help better. But thanks again! :)

    - Dan
     

Share This Page