Welcome! Log In Create A New Profile

Advanced

[njs] Renaming njs_exception_error_create() with njs_error_fmt_new().

Dmitry Volyntsev
February 04, 2019 03:34AM
details: https://hg.nginx.org/njs/rev/db4c9c8efff5
branches:
changeset: 756:db4c9c8efff5
user: hongzhidao <hongzhidao@gmail.com>
date: Mon Feb 04 06:22:51 2019 +0800
description:
Renaming njs_exception_error_create() with njs_error_fmt_new().

diffstat:

njs/njs_error.c | 5 ++---
njs/njs_error.h | 18 +++++++++---------
2 files changed, 11 insertions(+), 12 deletions(-)

diffs (56 lines):

diff -r 06e1b1790f9a -r db4c9c8efff5 njs/njs_error.c
--- a/njs/njs_error.c Mon Feb 04 05:33:19 2019 +0800
+++ b/njs/njs_error.c Mon Feb 04 06:22:51 2019 +0800
@@ -37,11 +37,10 @@ njs_error_new(njs_vm_t *vm, njs_value_ty


void
-njs_exception_error_create(njs_vm_t *vm, njs_value_type_t type,
- const char* fmt, ...)
+njs_error_fmt_new(njs_vm_t *vm, njs_value_type_t type, const char* fmt, ...)
{
va_list args;
- u_char buf[256], *p;
+ u_char buf[NXT_MAX_ERROR_STR], *p;

p = buf;

diff -r 06e1b1790f9a -r db4c9c8efff5 njs/njs_error.h
--- a/njs/njs_error.h Mon Feb 04 05:33:19 2019 +0800
+++ b/njs/njs_error.h Mon Feb 04 06:22:51 2019 +0800
@@ -9,26 +9,26 @@


#define njs_error(vm, fmt, ...) \
- njs_exception_error_create(vm, NJS_OBJECT_ERROR, fmt, ##__VA_ARGS__)
+ njs_error_fmt_new(vm, NJS_OBJECT_ERROR, fmt, ##__VA_ARGS__)
#define njs_eval_error(vm, fmt, ...) \
- njs_exception_error_create(vm, NJS_OBJECT_EVAL_ERROR, fmt, ##__VA_ARGS__)
+ njs_error_fmt_new(vm, NJS_OBJECT_EVAL_ERROR, fmt, ##__VA_ARGS__)
#define njs_internal_error(vm, fmt, ...) \
- njs_exception_error_create(vm, NJS_OBJECT_INTERNAL_ERROR, fmt, \
+ njs_error_fmt_new(vm, NJS_OBJECT_INTERNAL_ERROR, fmt, \
##__VA_ARGS__)
#define njs_range_error(vm, fmt, ...) \
- njs_exception_error_create(vm, NJS_OBJECT_RANGE_ERROR, fmt, ##__VA_ARGS__)
+ njs_error_fmt_new(vm, NJS_OBJECT_RANGE_ERROR, fmt, ##__VA_ARGS__)
#define njs_reference_error(vm, fmt, ...) \
- njs_exception_error_create(vm, NJS_OBJECT_REF_ERROR, fmt, ##__VA_ARGS__)
+ njs_error_fmt_new(vm, NJS_OBJECT_REF_ERROR, fmt, ##__VA_ARGS__)
#define njs_syntax_error(vm, fmt, ...) \
- njs_exception_error_create(vm, NJS_OBJECT_SYNTAX_ERROR, fmt, ##__VA_ARGS__)
+ njs_error_fmt_new(vm, NJS_OBJECT_SYNTAX_ERROR, fmt, ##__VA_ARGS__)
#define njs_type_error(vm, fmt, ...) \
- njs_exception_error_create(vm, NJS_OBJECT_TYPE_ERROR, fmt, ##__VA_ARGS__)
+ njs_error_fmt_new(vm, NJS_OBJECT_TYPE_ERROR, fmt, ##__VA_ARGS__)
#define njs_uri_error(vm, fmt, ...) \
- njs_exception_error_create(vm, NJS_OBJECT_URI_ERROR, fmt, ##__VA_ARGS__)
+ njs_error_fmt_new(vm, NJS_OBJECT_URI_ERROR, fmt, ##__VA_ARGS__)

void njs_error_new(njs_vm_t *vm, njs_value_type_t type, u_char *start,
size_t size);
-void njs_exception_error_create(njs_vm_t *vm, njs_value_type_t type,
+void njs_error_fmt_new(njs_vm_t *vm, njs_value_type_t type,
const char* fmt, ...);

void njs_memory_error(njs_vm_t *vm);
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Renaming njs_exception_error_create() with njs_error_fmt_new().

Dmitry Volyntsev 56 February 04, 2019 03:34AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 97
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready