.\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford .\" Junior University. All rights reserved. .\" .\" Permission to use, copy, modify and distribute this software and its .\" documentation for any purpose is hereby granted without fee, provided .\" that the above copyright notice and this permission notice appear in .\" all copies of this software and that you do not sell the software. .\" Commercial licensing is available by contacting the author. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, .\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY .\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. .\" .\" Author: .\" Phil Lacroute .\" Computer Systems Laboratory .\" Electrical Engineering Dept. .\" Stanford University .\" .\" $Date: 1994/12/31 19:49:53 $ .\" $Revision: 1.1 $ .\" .\" Macros .\" .FS -- function start .\" is return type of function .\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. .\" .FA -- function arguments .\" one argument declaration follows on next line .de FA .IP " " 4 .. .\" .FE -- function end .\" end of function declaration .de FE .PD .. .\" .DS -- display start .de DS .IP " " 4 .. .\" .DE -- display done .de DE .LP .. .TH vpGetError 3 "" VolPack .SH NAME vpGetError, vpGetErrorString \- retrieve error codes .SH SYNOPSIS #include .sp .FS vpResult \fBvpGetError(\fIvpc\fB)\fR .FA vpContext *\fIvpc;\fR .FE .sp .FS "char *" \fBvpGetErrorString(\fIcode\fB)\fR .FA vpResult \fIcode;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIcode\fR A VolPack error result code. .SH DESCRIPTION These routines are used for error handling. \fBvpGetError\fR return the error code from the first function call that failed since the last call to \fBvpGetError\fR. \fBvpGetErrorString\fR returns a descriptive string corresponding to an error code. The string is stored in a global array so it does not need to be copied to separate memory. .SH ERRORS \fBvpGetError\fR cannot fail. A return value not equal to VP_OK means that some previous function call has failed. \fBvpGetErrorString\fR returns NULL if \fIcode\fB is invalid. .SH SEE ALSO VolPack(3), vpCreateContext(3)