Sha256: 6ea538d1d98483a8bd9d82c6bad2b3f62b043ff0930c2787ce6e7d46102095d3

Contents?: true

Size: 790 Bytes

Versions: 40

Compression:

Stored size: 790 Bytes

Contents

/* err.h
 * Copyright (c) 2011, Peter Ohler
 * All rights reserved.
 */

#ifndef __OX_ERR_H__
#define __OX_ERR_H__

#include "ruby.h"

#define set_error(err, msg, xml, current) _ox_err_set_with_location(err, msg, xml, current, __FILE__, __LINE__)

typedef struct _Err {
    VALUE	clas;
    char	msg[128];
} *Err;

extern VALUE	ox_arg_error_class;
extern VALUE	ox_parse_error_class;

extern void	ox_err_set(Err e, VALUE clas, const char *format, ...);
extern void	_ox_err_set_with_location(Err err, const char *msg, const char *xml, const char *current, const char* file, int line);
extern void	ox_err_raise(Err e);

inline static void
err_init(Err e) {
    e->clas = Qnil;
    *e->msg = '\0';
}

inline static int
err_has(Err e) {
    return (Qnil != e->clas);
}

#endif /* __OX_ERR_H__ */

Version data entries

40 entries across 40 versions & 2 rubygems

Version Path
xaiml-0.1.3 vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/err.h
xaiml-0.1.2 vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/err.h
xaiml-0.1.1 vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/err.h
xaiml-0.1.0 vendor/bundle/ruby/2.5.0/gems/ox-2.10.0/ext/ox/err.h
ox-2.10.0 ext/ox/err.h
ox-2.9.4 ext/ox/err.h
ox-2.9.3 ext/ox/err.h
ox-2.9.2 ext/ox/err.h
ox-2.9.1 ext/ox/err.h
ox-2.9.0 ext/ox/err.h
ox-2.8.4 ext/ox/err.h
ox-2.8.3 ext/ox/err.h
ox-2.8.2 ext/ox/err.h
ox-2.8.1 ext/ox/err.h
ox-2.8.0 ext/ox/err.h
ox-2.7.0 ext/ox/err.h
ox-2.6.0 ext/ox/err.h
ox-2.5.0 ext/ox/err.h
ox-2.4.13 ext/ox/err.h
ox-2.4.12 ext/ox/err.h