home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Resources / Utilities / Partition Logic 0.68 / partlogic-0.68.iso / system / headers / sys / errors.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-05-10  |  4.3 KB  |  92 lines

  1. // 
  2. //  Visopsys
  3. //  Copyright (C) 1998-2007 J. Andrew McLaughlin
  4. //  
  5. //  This library is free software; you can redistribute it and/or modify it
  6. //  under the terms of the GNU Lesser General Public License as published by
  7. //  the Free Software Foundation; either version 2.1 of the License, or (at
  8. //  your option) any later version.
  9. //
  10. //  This library is distributed in the hope that it will be useful, but
  11. //  WITHOUT ANY WARRANTY; without even the implied warranty of
  12. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
  13. //  General Public License for more details.
  14. //
  15. //  You should have received a copy of the GNU Lesser General Public License
  16. //  along with this library; if not, write to the Free Software Foundation,
  17. //  Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. //
  19. //  errors.h
  20. //
  21.  
  22. // This file contains all of the standard error numbers returned by
  23. // calls to the Visopsys kernel (and by applications programs, if so 
  24. // desired).
  25.  
  26. #if !defined(_ERRORS_H)
  27.  
  28. // Items concerning severity for kernel errors
  29. typedef enum {
  30.   kernel_panic, kernel_error,  kernel_warn 
  31. } kernelErrorKind;
  32.  
  33. // This is the generic error
  34. #define ERR_ERROR          -1  // No additional error information
  35.  
  36. // These are the most basic, standard, catch-all error codes.  They're not
  37. // very specific or informative.  They're similar in name to some of the UNIX
  38. // error codes.
  39. #define ERR_INVALID        -2  // Invalid idea, generally
  40. #define ERR_PERMISSION     -3  // Permission denied
  41. #define ERR_MEMORY         -4  // Memory allocation or freeing error
  42. #define ERR_BUSY           -5  // The resource is in use
  43. #define ERR_NOSUCHENTRY    -6  // Generic things that don't exist
  44. #define ERR_BADADDRESS     -7  // Bad pointers
  45. #define ERR_TIMEOUT        -8  // Something timed out
  46.  
  47. // These are a little bit more specific
  48. #define ERR_NOTINITIALIZED -9  // The resource hasn't been initialized
  49. #define ERR_NOTIMPLEMENTED -10  // Functionality that hasn't been implemented
  50. #define ERR_NULLPARAMETER  -11 // NULL pointer passsed as a parameter
  51. #define ERR_NODATA         -12 // There's no data on which to operate
  52. #define ERR_BADDATA        -13 // The data being operated on is corrupt
  53. #define ERR_ALIGN          -14 // Memory alignment errors
  54. #define ERR_NOFREE         -15 // No free (whatever is being requested)
  55. #define ERR_DEADLOCK       -16 // The action would result in a deadlock
  56. #define ERR_PARADOX        -17 // The requested action is paradoxical
  57. #define ERR_NOLOCK         -18 // The requested resource could not be locked
  58. #define ERR_NOVIRTUAL      -19 // Virtual address space error
  59. #define ERR_EXECUTE        -20 // Could not execute a command or program
  60. #define ERR_NOTEMPTY       -21 // Attempt to remove something that has content
  61. #define ERR_NOCREATE       -22 // Could not create an item
  62. #define ERR_NODELETE       -23 // Could not delete an item
  63. #define ERR_IO             -24 // Input/Output error
  64. #define ERR_BOUNDS         -25 // Array bounds exceeded, etc
  65. #define ERR_ARGUMENTCOUNT  -26 // Incorrect number of arguments to a function
  66. #define ERR_ALREADY        -27 // The action has already been performed
  67. #define ERR_DIVIDEBYZERO   -28 // You're not allowed to do this!
  68. #define ERR_DOMAIN         -29 // Argument is out of the domain of math func
  69. #define ERR_RANGE          -30 // Result is out of the range of the math func
  70. #define ERR_CANCELLED      -31 // Operation was explicitly cancelled
  71. #define ERR_KILLED         -32 // Process or operation was unexpectedly killed
  72. #define ERR_NOMEDIA        -33 // A removable disk has no media present.
  73.  
  74. // Things to do with files
  75. #define ERR_NOSUCHFILE     -34 // No such file
  76. #define ERR_NOSUCHDIR      -35 // No such directory
  77. #define ERR_NOTAFILE       -36 // The item is not a regular file
  78. #define ERR_NOTADIR        -37 // The item is not a directory
  79. #define ERR_NOWRITE        -38 // The item cannot be written
  80.  
  81. // Other things that don't exist
  82. #define ERR_NOSUCHUSER     -39 // The used ID is unknown
  83. #define ERR_NOSUCHPROCESS  -40 // The process in question does not exist
  84. #define ERR_NOSUCHDRIVER   -41 // There is no driver to perform an action
  85. #define ERR_NOSUCHFUNCTION -42 // The requested function does not exist
  86.  
  87. // Oops, it's the kernel's fault...
  88. #define ERR_BUG            -43 // An internal bug has been detected   
  89.  
  90. #define _ERRORS_H
  91. #endif
  92.