Post Reply 
How to simulate system error msgs on 48?
06-27-2014, 02:38 PM
Post: #4
RE: How to simulate system error msgs on 48?
(06-27-2014 08:00 AM)HP67 Wrote:  I want to be able to implement all the same effects as a system error message. I want the command name to appear in the error message, and I believe I'll have to use DOERR so ERRN and ERRM are set so the replacement words I'm working on back-porting all produce identical results as the GX words they're meant to replace.

Thanks for the additional explanation. Now I understand what you're trying to do.

Is keeping the error number intact really that important? If not, a structure like the following in your replacement code is reasonably compact:
Code:
\<<
  IFERR
    @ some code
    @ some code
    0 INV                 @ to force an error
  THEN
    "MyCmd Error: " 10 CHR + ERRM + DOERR
  END
\>>

I'm not aware of any UserRPL way to keep the error number intact that still acts exactly like a system error. The following is close, but not exact. It's also much messier:
Code:
\<<
  IFERR
    0 INV                 @ to force an error
  THEN
    "MyCmd Error:" 1 DISP
    ERRM 2 DISP
    1400 0.08 BEEP
    1 FREEZE
    0 WAIT DROP KILL
  END
\>>

Note that pressing ON/ATTN to clear the screen in that case will actually interrupt the program instead of allowing it to continue, which will leave an additional zero on the stack. Perhaps someone else knows of a better solution -- this is all I can think of at the moment.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How to simulate system error msgs on 48? - DavidM - 06-27-2014 02:38 PM



User(s) browsing this thread: 1 Guest(s)