LCOV - code coverage report
Current view: top level - sql/common - exception_buffer.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 6 11 54.5 %
Date: 2021-10-13 02:24:04 Functions: 1 2 50.0 %

          Line data    Source code
       1             : /*
       2             :  * This Source Code Form is subject to the terms of the Mozilla Public
       3             :  * License, v. 2.0.  If a copy of the MPL was not distributed with this
       4             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       5             :  *
       6             :  * Copyright 1997 - July 2008 CWI, August 2008 - 2021 MonetDB B.V.
       7             :  */
       8             : 
       9             : #include "monetdb_config.h"
      10             : #include "exception_buffer.h"
      11             : #include <string.h>
      12             : 
      13             : exception_buffer *
      14      115931 : eb_init(exception_buffer *eb)
      15             : {
      16      115931 :         if (eb) {
      17      115931 :                 eb->enabled = 0;
      18      115931 :                 eb->code = 0;
      19      115931 :                 eb->msg = NULL;
      20             :         }
      21      115931 :         return eb;
      22             : }
      23             : 
      24             : void
      25           0 : eb_error( exception_buffer *eb, char *msg, int val )
      26             : {
      27           0 :         eb->code = val;
      28           0 :         eb->msg = msg;
      29           0 :         fprintf(stderr, "%s\n", msg?msg:"ERROR");
      30           0 :         longjmp(eb->state, eb->code);
      31             : }

Generated by: LCOV version 1.14