$Id$ /******************************************************************** * Copyright (c) 1995 - 2004, EMBL, Peter Keller * * CCIF: a library to access and output data conforming to the * CIF (Crystallographic Information File) and mmCIF (Macromolecular * CIF) specifications, and other related specifications. * * This library is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 3, modified in accordance with the provisions of the * license to address the requirements of UK law. * * You should have received a copy of the modified GNU Lesser General * Public License along with this library. If not, copies may be * downloaded from http://www.ccp4.ac.uk/ccp4license.php * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * ********************************************************************/ List of error conditions for the CCIF toolbox and associated/borrowed code. Convert to C source with condition.awk (needs nawk). Format is four fields, separated by one or more tab characters: FACILITY + MESSAGE_NAME + SEVERITY_CODE + FMT_STRING In general, FMT_STRING should not have a trailing '\n'. Lines which don't have four fields in them are ignored by condition.awk. The severity codes are converted to numerical values by condition.awk. The values are: warn 0 success 1 error 2 inform 3 severe 4 If this looks remarkably like VMS condition handling, you are free to interpret this as frustration that customising signals under U**x would involve rebuilding the kernel . The use of these severities follows the VMS usage - see the sections of the VMS documentation "Condition Values" (Programming Concepts book), and "Condition Value" (Calling Standard book). At the moment, this is just used as a convenient way of printing out a message, setting the eventual exit code, and, if appropriate, terminating execution. At some point in the future, though, this could become more sophisticated (i.e. use a condition stack). CCIF NOTNUM warn "%s is not a numeric type. You may get a junk value!" CCIF ISINT warn "%s is an integer type. I hope that you know what you are doing!" CCIF ISREAL warn "%s is a real numeric type. I hope that you know what you are doing!" CCIF ISNUM warn "%s is a numeric type - it will be returned as a string!" CCIF ISTEXT warn "%s is a text type. You will get a maximum of %d characters!" CCIF MULTILINE warn "The value of %s is multi-line text. You will only get the first line!" CCIF CHARISTEXT warn "The value of %s is multi-line text. This is forbidden by the mmCIF dictionary!" CCIF NOTMLINE inform "%s is not an item which may span lines. You may make your program simpler\nby using one of the other ccif_get* functions...." CCIF NOTREAL severe "%s is not a numeric real data type!" CCIF NOTREALESD severe "%s is not a numeric real+esd data type!" CCIF NOTINT severe "%s is not a numeric integer data type!" CCIF NOTCHAR severe "%s is not a text or char data type!" CCIF BADESD severe "Cannot output esd as associated data item for %s!\nPlease check your program logic against the CIF dictionary entry for this item!" CCIF NOLOGNAME severe "No translation for logical name \"%s\"!" CCIF OPENING inform "\n\n --- Opening CIF ---\nLogical name: \"%s\", full name \"%s\"" CCIF OPENED inform " --- CIF opened %s ---" CCIF OPEN inform " --- CIF Logical name: \"%s\", full name \"%s\" already open ---\n( Equivalent to logical name \"%s\")" CCIF DICTLOADED inform "\n --- CIF Dictionary loaded ---\nLogical name: \"%s\", full name \"%s\"" CCIF NEWBLOCK inform "\nNew data block \"%s\" created for logical unit \"%s\"" CCIF REINIT warn "ccif_init called more than once" CCIF NOITEMIP warn "Line %d:\tdata name \"%s\" not present in dictionary" CCIF NOITEM warn "Data name or category \"%s\" not defined in dictionary" CCIF UNKWNCMP error "Don't recognize comparison type \"%c\" for data item \"%s\"" CCIF NOMEM severe "Out of memory" CCIF SORTEMPTYCAT error "Cannot specify \"%s\" for sorting in block \"%s\": no looped data in category.\nCheck the returned status value from ccif_init_sort" CCIF ADDSORTCAT error "ccif_add_to_sort called with \"%s\", which is the name of a category" CCIF 1LINESORT error "Data item \"%s\" is allowed to have multi-line text, so cannot use for sorting.\nIngoring." CCIF NOKEYSORT severe "Serious problem with trying to sort category \"%s\". Giving up" CCIF SORTED inform "\n --- Category \"%s\" in block \"%s\" of logical file \"%s\" ---\n --- has been sorted on the following items: ---" CCIF BADADDSORT error "Cannot add item \"%s\" to sort list for category \"%s\" - ignoring" CCIF NOFREESORT severe "No free sorting structures.\nUse \"ccif_free_sort\", or compile with a higher value of NSORT_TREES" CCIF BADINDEX severe "Sort number %d has not been initialised!" CCIF IDXRANGE severe "Sort index %d out of range (must be between 0 and %d inclusive)" CCIF NOTROW severe "Key supplied for searching tree %d is not a pointer to a Row node" CCIF CXTRANGE severe "Context %d out of range (must be between 0 and %d inclusive)" CCIF BADCONTEXT severe "Context %d has not been initialised!" CCIF WRONGSORTCXT error "Not associating category with sort:\n\tContext %d refers to category \"%s\" in block %d\n\tSort %d refers to category \"%s\" in block %d!" CCIF NOROWFIND severe "Serious error with trying to find row in sort tree" CCIF NOTLOOPED warn "Category \"%s\" in block %d has no looped data" CCIF NEEDROW severe "Must be called with a pointer to a row node!" CCIF PRINTROW inform "Search completed." CCIF BADRBNODE severe "Node of red-black sort tree does not point at specified loop packet!" CCIF LINEBAD severe "Multi-line text not allowed in this context!" CCIF CIFNOTOPEN severe "\"%s\" not open!" CCIF SAMECXT severe "Input and output context are identical!" CCIF ROCXT severe "Context number %d is read-only!" CCIF ROCXTADD severe "Context on file %s has not been opened for writing!\nCannot add data item %s." CCIF TONONLOOPED severe "Cannot copy a row to non-looped data!" CCIF DIFFCAT severe "Cannot copy row between different categories!" CCIF FROMNONLOOPED severe "Cannot copy row from non-looped data (yet)!" CCIF NONUNIQUEBLK severe "File %s (line %d)\n:more than one data block called %s!" CCIF MAXCIFS severe "Attempted to open too many CIF's!" CCIF SAMEIO severe "Attempted to open %s for both input and output!" CCIF VMSSAMEIO severe "Attempted to use %s for both input and output with CCP4_OPEN set to UNKNOWN!" CCIF UNXSAMEIO severe "Error opening %s\nCannot use the same filename for input and output under Unix!" CCIF READONLY severe "Logical file %s has been opened read-only!" CCIF 1LOOP severe "Line %d: a category may not be defined in more than one loop!" CCIF CXTEMPTY severe "Attempted to retrieve value using empty context!" CCIF NOTINLOOP severe "Requsted item %s is not in loop pointed to by context %d!" CCIF BADAST severe "Problem with abstract syntax tree: token at line %d is not a Data_item or Loop!" CCIF NOAPPEND warn "Will not try to append row. Are you calling one of the CCIF_GET_* routines with\na status of APPEND_ROW?" CCIF BADGET severe "name and &item are both NULL!" CCIF WRONGCXT severe "Context %d points at category %s; cannot retrieve value of %s!" CCIF NOTINDICT severe "No dictionary entry for %s!" CCIF CATNOTCOMPLETE warn "Could not open context on category '%s'; item '%s' not defined in dictionary!" CCIF FOPEN severe "Cannot open file %s for %s!" CCIF NOSUCHFILE warn "Cannot open logical file \"%s\" - file \"%s\" does not exist!" CCIF BADLOOP severe "Line %d: Loop contains items from more than one category!" CCIF PARTLOOP severe "Line %d: Attempt to process loop with incomplete loop packet" CCIF NOFREECONTEXTS severe "No free contexts available.\n If your program needs more, increase NCONTEXTS in value_manip.h, and rebuild libccif.\nOtherwise, check that your program frees unexhausted contexts.\n" CCIF NULLSYMPTR severe "Null symbol table entry pointer!" CCIF NOUSEMMAP severe "zzs_undump called with use_mmap != 0, but code compiled with _USE_MMAP == 0!" CCIF NOREC severe "Cannot find symbol table record for item \"%s\"!\n(Probably not defined in dictionary)" CCIF BADCAT severe "Something has gone horribly wrong with category %s!" CCIF NOKEY severe "No _category_key.id items defined for category \"%s\"\nCannot convert data items to loop!" CCIF DBNAMELEN warn "Datablock name\n%s\nis too long for a single line of a CIF.\nTruncating to %d characters!" CCIF DNNOTUNIQ warn "Line %d: Data name %s (or its alias(es)) occur more than \nonce in the data file (or dictionary save frame)!\nExtra occurrences ignored" CCIF STRTABVAL inform "String table contains \"%s\" at offset %d" CCIF STRTABLEN warn "Attempt to print value off the end of string table! (offset was %d)" CCIF BADFMT warn "Cannot sprintf a sample value of \"%s\" using \"%s\"!\nUsing default format" CCIF BADFMTFLAGS warn "Invalid flags specified for output format of \"%s\"!\nAllowed characters are: \"%s\"" CCIF BADFMTCHAR warn "Invalid format conversion character given for \"%s\"!\nUse one of \"idfeEgG\" apropriate to type of data item" CCIF BADESDCHAR warn "Spurious characters in value \"%s\" (line %d)!\nReturning (null) " CCIF VALTOOLONG error "Supplied value for \"%s\" is greater than maximum length of lines in CIF's.\nTruncating to %d characters:\n%s" CCIF LINETOOLONG warn "Line limit %d invalid: must be between 1 and %d!" CCIF SEMI warn "Premature semi-colon in supplied text. Truncating" CCIF BADBLOCKNAME error "\"%s\" is an invalid data block heading! Returning block_not_found!" CCIF BADOUTPUT warn "CCIF was requested to write output to file \"%s\" which might have generated an illegal STAR file.\nPlease examine the comments which have been written to the file." CCIF MAPPEDFILES warn "Mapped file houskeeping problem with %s - fewer than 0 nodes. Soldiering on..." CCIF SYSERR severe "System error: %s\nSystem message was:\n%s" Facility "DICT" refers to problems with the conversion of dictionary information. DICT BADDEF severe "Save frame %s appears to be garbled!" DICT ENTRYMISS severe "Lost track of entry for %s!" DICT NOMANDITEM severe "Mandatory item %s not specified in %s!" DICT NOMANDCAT severe "Mandatory category %s not specified in %s!" DICT NOESDREGEXP severe "_item_type_conditions.code of 'esd' for item %s requires an applicable _item_type_list.construct!" DICT BADESDEXP severe "_item_type_list.construct for %s does not seem to allow an appended esd,\nbut the definition of %s requires one!" DICT NSUBEXP severe "You seem to have a very complicated construct for type %s!\nTry increasing the value of NMATCH (ccif_defines.h) and re-building" DICT NOSEQ warn "%s: _item_type_conditions_code 'seq' not implemented (yet)!" DICT NONUMEXP warn "No construct given for numeric type %s - assuming real.\nPlease consider supplying a regular expression in _item_type_list.construct for this type" DICT NOCHAREXP warn "No construct given for non-numeric type %s - assuming multi-line text.\nPlease consider supplying a regular expression in _item_type_list.construct for this type" DICT BADKEYCAT severe "Cannot add %s to key items list!\n(_category_key.id is %s, but it should be the name of a category)." DICT CREATEREC warn "Creating record for %s!" DICT UPDATE inform "%s already defined for %s!\nUpdating value at line %d of dictionary" DICT UPDATEP inform "%s already defined for %s!\nUsing value of parent item" DICT ALIASUPDATE inform "Alias \"%s\" already defined! Updating value at line %d of dictionary" DICT IMPUPDATE inform "%s already defined for %s!\nUpdating value implicitly from line %d of dictionary" DICT NOTYPE warn "Cannot find _item_type_list.code \"%s\" for %s!" DICT NODEFTYPE warn "Not storing default value of %s for %s\n(_item_type.code unknown or not specified)" DICT NODEFBTYPE warn "Not storing default value of %s for %s\n(don't know basic_type of item)" DICT DIFFBTYPE warn "Lost default value for %s (changed type of item)" DICT CANTADD severe "Line %s: Cannot add \"%s\" to symbol table!" DICT SAVEFRAME inform "Processing \"%s\" (%s pass)" DICT NOCAT warn "Category pointer of \"%s\" not set. Ignoring this data item" ANTLR BADLOOP warn "Syntax error at line %d:\tbadly formed loop" ANTLR BADPCKT warn "Line %d: %d names and %d values in loop" ANTLR MISTOK warn "Syntax error at line %d:\tmis-matched token" ANTLR NVALT warn "Syntax error at line %d:\tno viable alternative" ANTLR BADDATA severe "Syntax error near line %d:\texpecting looped data or a - pair" ANTLR UNKPSIG warn "Unknown parser exception raised at line %d" ANTLR BADITEM warn "Syntax error at line %d:\tdata name \"%s\" must be followed by a data value!" ANTLR BADSTR warn "Probable syntax error near line %d:\tcannot match semi-colon bounded text string" ANTLR EMPTYLOOP warn "Syntax error at line %d:\tLoops with no data not allowed!" ANTLR GLOBAL severe "Syntax error at line %d:\tGlobal blocks not allowed in CIF's!" ANTLR SAVE severe "Syntax error at line %d:\tSave frames not allowed in CIF's!" ANTLR NULLAST severe "Cannot make an AST node with a null pointer!" ANTLR STKOVFLOW severe "fatal: attrib/AST stack overflow %s(%d)!" DLG LEXERR error "%s near line %d (text was '%s')" DLG NOLASTTOK severe "Line %d: Cannot get last token in file!" SOR NOTINRANGE error "parse error: expected token range %d..%d found token %d" SOR NULL error "parse error: expected token range %d..%d found NULL tree" SOR NOTWILD error "parse error: expected any token/tree found found NULL tree" SOR WRONGTOK error "parse error: expected token %d found token %d" SOR NULL2 error "parse error: expected token %d found NULL tree" SOR NOVIALTNULL error "parse error: in rule %s, no viable alternative for NULL tree" SOR NOVIALT error "parse error: in rule %s, no viable alternative for tree" SOR PANIC severe "Message was:\n%s" REDBLACK NOSORTORDER severe "No sort order available for comparing rows!\nCategory was: \"%s\"" REDBLACK NONHEAD severe "Function called on non-head node: 0x%x" REDBLACK NODELINT severe "Cannot delete an internal node: 0x%x" REDBLACK NODELHEAD severe "Cannot delete the head of an rb_tree: 0x%x" REDBLACK SIBBLACK severe "Internal deletion problem - sibling is black" REDBLACK SIBNOTINT severe "Internal deletion problem - sibling not an internal node" REDBLACK 23c severe "Internal deletion problem - 2.3c incorrect" REDBLACK NONEXT severe "Function called on non-external node 0x%x" ASTLIB NOMEM severe "Out of memory" RX REGEXECERR severe "regexec error: %s" RX REGCOMPERR severe "regcomp error number %d: %s\nOffending construct is: \"%s\"" RX REGCOMPERR2 severe "regcomp error: %s\nSuggests that your string table is corrupt!" VMS SYSMSG severe "VMS system error at: File \"%s\" line %d\nMessage was:\n%s" VMS CRTL severe "VMS system error (reported by C run-time library): %s\nMessage was:\n%s" VMS TRNLNM severe "Serious problem with $TRNLNM!" RMS NOTSEQ severe "%s is an indexed or relative file. I will only process sequential files!" RMS NOCRINFO severe "File \"%s\": \nI cannot process variable-length records without carriage control information!" RMS RECTOOLONG severe "Some records in file \2%s\" are too long to process!" RMS NORECTYPE severe "Don't recognise record type of file \"%s\"!" EXIT FAIL severe "Exit called (unsuccessful termination) at line %d of file %s"