1. Error checking

I was wondering if Mr. Craig could post here the COMPLETE list of error checks
that the language provides, since the manual says "and many more" :) after
detailing the important ones. As some of you may remember, I'm using Euphoria
for the labs assignments in my course here at CS degree, so my students will
undoubtly bug me off about the checks (you can always trust your students
to ask something like that hehehe). Thanks for your help.

Carlos Gonzalia, Universidad Nacional del Sur, Argentina, South America
gonzalia at criba.edu.ar

new topic     » topic index » view message » categorize

2. Error checking

Carlos Jose Gonzalia writes:
> I was wondering if Mr. Craig could post here the COMPLETE list of error checks
> that the language provides, since the manual says "and many more" :)

Here's a list of the print strings for the error messages
that Euphoria (ex.exe) can produce. There are two categories:

   1. Compile-time errors: errors that are detected as your
      source code is translated into an efficient internal form.
   2. Run-time errors: errors that are detected while your
      program is being executed (i.e. in internal form).


1. Compile-time errors

"%s is never used"                   [warning only]
"%s is never assigned a value"       [warning only]
"can't mix profile and profile_time" [warning only]

"may not assign to a for-loop variable"
"may not change the value of a constant"
"exit statement must be inside a loop"
"no value returned from function"
"type must return true / false value"
"unknown with/without option"
"unknown escape character"
"only one decimal point allowed"
"number is too big"
"hex number is too big"
"tab character found in string - use \\t instead"
"single-quote character is empty"
"character constant is missing a closing '"
"tab character found in string - use \\t instead"
"end of line reached with no closing \""
"the compiler has run out of memory"
"the previous subprogram is too large"
"the previous subprogram has too many lines"
"subprogram is too large"
"too many lines"
"a loop variable name is expected here"
"a variable name is expected here"
"a name is expected here"
"a type is expected here"
"a parameter name is expected here"
"badly-formed list of parameters - expected ',' or ')'"
"types must have exactly one parameter"
"file name is missing"
"do not put quotes around an include file name"
"sample size must be a positive integer"
"'global' must be followed by:\n     <a type>, 'constant',
   'procedure', 'type' or 'function'"
"function result must be assigned or used"
"return must be inside a procedure or function"
"exit must be inside a loop"
"illegal character"
"unknown command"
"I/O error reading source file"
"source line is too long"
"includes are nested too deeply"
"program includes too many files"
"fractional part of number is missing"
"number not formed correctly"
"hex number not formed correctly"
"Can't open %s\n"
"%s has not been declared",
"%s takes %s%d argument%s"
"attempt to redefine %s"
"Built-in %s() redefined"
"can't open %s or %s"


 2. Run-time errors

"Your program has run out of memory.\nOne moment please..."
"machine_proc() expected to see {x,y} point"
"second argument to pixel must be a length-2 sequence"
"argument to get_pixel() must be a sequence of length 2 or 3"
"3rd argument of get_pixel() must be >= 0"
"mouse locks failed"
"file must be open for where()"
"where() failed on this file"
"file must be open for seek()"
"name for dir() is too long"
"current directory not available"
"bad argument to tick_rate()"
"sequence has wrong length"
"in machine_func an atom was expected, not a sequence"
"program aborted"
"attempt to subscript an atom\n(assigning to it)"
"subscript must be an atom\n(assigning to subscript of a sequence)"
"sequence found inside character string"
"repetition count must be an atom"
"repetition count must not be negative"
"attempt to divide by 0"
"can't get remainder of a number divided by 0"
"bitwise operations are limited to 32-bit numbers"
"can't raise 0 to power <= 0"
"can't raise negative number to non-integer power"
"attempt to take square root of a negative number"
"may only take log of a positive number"
"argument to rand must be >= 1"
"argument to rand must be <= 1073741823"
"second argument of find() must be a sequence"
"first argument of match() must be a sequence"
"second argument of match() must be a sequence"
"first argument of match() must be a non-empty sequence"
"attempt to slice an atom"
"slice lower index is not an atom"
"slice upper index is not an atom"
"file number must be an atom"
"wrong file mode for attempted operation"
"open mode must be a sequence"
"device or file name must be a sequence"
"file name for open() is too long"
"invalid open mode"
"can't open -- too many open files"
"number is too big for %x or %o format"
"not enough values to print in printf()"
"first argument of system() must be a sequence"
"second argument of system() must be an atom"
"argument to getenv must be a sequence"
"attempt to subscript an atom\n(reading from it)"
"subscript must be an atom\n(reading an element of a sequnce)"
"true/false condition must be an ATOM"
"length of an atom is not defined"
"argument to rand() must be >= 1"
"attempt to divide by 0"
"Can't get remainder of a number divided by 0"
"for-loop variable is not an atom"
"for-loop limit is not an atom"
"for-loop increment is not an atom"
"attempt to exit a function without returning a value"
"first argument of append must be a sequence"
"first argument of prepend must be a sequence"
"second argument of position() is not an atom"
"first argument of position() is not an atom"
"number of bytes to peek is less than 0"
"first argument to poke() must be an atom"
"argument to call() must be an atom"
"argument to trace() must be an atom"
"argument to trace() must be 0, 1 or 2"
"argument to abort() must be an atom"
"machine(%d,...) not supported"
"variable %s has not been assigned a value"
"slice lower index is less than 1 (%ld)"
"slice upper index is less than 0 (%ld)"
"slice length is less than 0 (%ld)"
"slice starts past end of sequence (%ld > %ld)"
"slice ends past end of sequence (%ld > %ld)"
"bad file number (%ld)"
"file number %d is not open"
"format specifier is incomplete (%s)"
"Unknown printf format (%s)"
"can't open %s"

==================

Regards,
  Rob Craig
  Rapid Deployment Software

new topic     » goto parent     » topic index » view message » categorize

3. Re: Error checking

Thanks for publishing the error messages. I hope it starts a trend
among software publishers. Bye Art
Arthur P. Adamson, The Engine Man, euclid at mail.horandata.net

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu