Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ASetIOErrorHandler(3X)

ASetErrorHandler(3X)  —  Series 700 Only

NAME

ASetErrorHandler − replace default error handler with specified handler

SYNOPSIS

#include <audio/Alib.h>

AErrorHandler ASetErrorHandler (AErrorHandler handler);

DESCRIPTION

ASetErrorHandler() replaces the default error handler with the handler specified in handler, and returns a pointer to the handler that was previously in effect. The new error handler should return AENoError, if the error should be ignored.  If the error should not be ignored and the handler cannot correct it, the handler should return the error code. 

handler is the pointer to an application-supplied handler function. 

RETURN VALUE

Upon successful completion, ASetErrorHandler() returns a pointer to the handler that was previously in effect. 

ERRORS

ASetErrorHandler() does not return an error status. 

EXAMPLES

The following example replaces the default error handler with a handler named myhandler.

long myhandler(

Audio       *audio,
AErrorEvent *err_event

)
{
char errorbuff[132];
AGetErrorText(audio, err_event->error_code, errorbuff, 131);
printf ("Error is %s\n", errorbuff);
return (err_event->error_code);
}
.
.
.
AErrorHandler prev_handler;    /* ptr to previous handler */
AErrorHandler myhandler;       /* this data type is a function*/
.
.
.
/* replace default error handler */
prev_handler = ASetErrorHandler(myhandler);

DEPENDENCIES

This function belongs to the Audio Library of functions that manage connections to an audio server.  The audio server must run on a system that has audio hardware.  To find out whether or not your system has audio hardware, refer to the hardware manual that accompanies your system. 

AUTHOR

ASetErrorHandler() was developed by HP. 

SEE ALSO

ASetIOErrorHandler(3X). 

Using the Audio Application Program Interface.

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026