Veritas NetBackup™ DataStore SDK Programmer's Guide for XBSA 1.1.0
- Introduction to NetBackup XBSA
- How to set up the SDK
- Using the NetBackup XBSA interface
- NetBackup XBSA data structures
- NetBackup XBSA environment
- XBSA sessions and transactions
- Creating a NetBackup XBSA application
- How to build an XBSA application
- How to run a NetBackup XBSA application
- API reference
- Function calls
- Function specifications
- Type definitions
- Process flow and troubleshooting
- How to use the sample files
- Support and updates
- Appendix A. Register authorized locations
NBBSAGetServerError
Get the error code and text from the NetBackup server.
SYNOPSIS
#include <XBSA.h>
#include <nbbsa.h>
int NBBSAGetServerError(BSA_Handle bsaHandle, int *ServerStatus, BSA_UInt32 sizePtr, char *ServerStatusStr)
DESCRIPTION
NBBSAGetServerError returns the error code and corresponding text message generated from the NetBackup processes. This can be useful in logging a more accurate cause of a failure as compared to the NBBSA error code, which tends to be very generic when the error occurred on the NetBackup server.
PARAMETERS
BSA_Handle bsaHandle (I) | The handle that associates this call with a previous call to BSAInit. |
int *ServerStatus (O) | Pointer to the NetBackup error code that has been returned from the NetBackup server. |
BSA_UInt32 sizePtr (I/O) | Pointer to the size of the ServerStatusStr in bytes. |
char *ServerStatusStr (O) | Pointer to the text string of the server status. |
EXTENDED DESCRIPTION
NBBSAGetServerError requires the ServerStatusStr string to be allocated and the size of this string to be entered in the sizePtr parameter. This ensures that the NetBackup error text can fit in the string. The function resets the sizePtr to the actual size of the error text that is returned.
RETURN VALUE
The following return codes are returned by this function:
BSA_RC_BUFFER_TOO_SMALL | The size of the data buffer is too small for the error text. |
BSA_RC_NULL_ARGUMENT | A NULL pointer was encountered in one of the arguments. |
BSA_RC_SUCCESS | The function successfully returned the error. |