gnss_error.h File Reference


Detailed Description

GNSS core 'c' function library: error and warning macros.

Author:
Glenn D. MacGougan (GDM)
Date:
2008-03-19
Since:
2008-03-19
Remarks:
"LICENSE INFORMATION"
Copyright (c) 2008, refer to 'author' doxygen tags
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided the following conditions are met:

THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file gnss_error.h.

#include <stdio.h>

Go to the source code of this file.

Defines

#define GNSS_ERROR_MSG(msg)
 Output an error message with the following format:
file, function, line number, msg
.


Define Documentation

#define GNSS_ERROR_MSG ( msg   ) 

Value:

{ \
  const char *themsg = msg; \
  if( themsg != NULL ) \
  { \
    printf( "\n%s,\n%s, %d,\n%s\n", __FILE__, __FUNCTION__, __LINE__, themsg ); \
  } \
  else \
  { \
  printf( "\n%s,\n%s, %d,\nUnknown Error\n", __FILE__, __FUNCTION__, __LINE__ ); \
  } \
}
Output an error message with the following format:
file, function, line number, msg
.

char msg[128];
char fname[24];
sprintf( fname, "test.txt" );
sprintf( msg, "Unable to open %s", fname );
ERROR_MSG( msg );

Author:
Glenn D. MacGougan (GDM)
Date:
2008-03-19
Since:
2008-03-19

Definition at line 65 of file gnss_error.h.

SourceForge.net Logo