Author Topic: Oxygen error numbers, hints and tips  (Read 1023 times)

0 Members and 1 Guest are viewing this topic.

Brian Alvarez

  • Guest
Oxygen error numbers, hints and tips
« on: December 15, 2018, 08:47:12 AM »
 Hello Charles, this is not a bug report nor a request... its an option thrown to the table. :)

 I just wanted to put an option for you. Currently PluriBASIC is doing its best to parse the errors that Oxygen throws when a coding error is found (so please dont change the grammar or text of existing error messages).

Normally PluriBASIC catches errors nicely when done in the manual code, but since PluriBASIC also allows RAW blocks, on them you can enter Oxygen code
directly, and that code is passed directly to Oxygen without checking it, so, there is the chance that the code contains errors and PluriBASIC reports
them the best it can. See image attached.

 Although I know it is not yet implemented, i just wanted to let you know that PluriBASIC is already listening for ERRNUM, EXPAND, and HINT on the errors that Oxygen reports, and will use them for these error messages, in case you want to provide more details about the errors. It can be implemented as follows:

Code: [Select]
ERROR: This is a small description of the error
WORD: offending_word
FILE: c:\somefile.o2bas
LINE: 201
EXPAND: THE LINE OF CODE THAT A MACRO EXPANDED
HINT: This is a more detailed explanation of the error, which can contain information about how to fix the code or tips on how to improve it.\r\nThis is another row:\r\n\r\nThis is two rows later.
ERRNUM: 55

 These are parsed when the first line of the output is not "SUCCESS COMPILING:".

 With error numbers, Oxygen users will be able to look for more information on a future manual or something. With hints, they may not even need to look in the manual. :)
« Last Edit: December 15, 2018, 11:21:37 AM by Brian Alvarez »

Charles Pegge

  • Guest
Re: Oxygen error numbers, hints and tips
« Reply #1 on: December 17, 2018, 08:39:31 PM »
Hi Brian,

The error messages (o2_error) are fairly stable but I will need to re-serialise the error numbers at some stage (o2_errno). O2 Error numbers might be easier for Pluribasic to deal with eventually.