Skip to content

Commit 0af1ca4

Browse files
committed
Deprecate NanErrnoException in favor of ErrnoException
1 parent 48d7b53 commit 0af1ca4

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

nan.h

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ class TryCatch {
846846
node::FatalException(v8::Isolate::GetCurrent(), try_catch.try_catch_);
847847
}
848848

849-
NAN_INLINE v8::Local<v8::Value> NanErrnoException(
849+
NAN_INLINE v8::Local<v8::Value> ErrnoException(
850850
int errorno
851851
, const char* syscall = NULL
852852
, const char* message = NULL
@@ -855,6 +855,14 @@ class TryCatch {
855855
message, path);
856856
}
857857

858+
NAN_DEPRECATED NAN_INLINE v8::Local<v8::Value> NanErrnoException(
859+
int errorno
860+
, const char* syscall = NULL
861+
, const char* message = NULL
862+
, const char* path = NULL) {
863+
return ErrnoException(errorno, syscall, message, path);
864+
}
865+
858866
template<typename T>
859867
NAN_INLINE void SetIsolateData(
860868
v8::Isolate *isolate
@@ -1157,14 +1165,22 @@ widenString(std::vector<uint16_t> *ws, const uint8_t *s, int l) {
11571165
node::FatalException(const_cast<v8::TryCatch &>(try_catch.try_catch_));
11581166
}
11591167

1160-
NAN_INLINE v8::Local<v8::Value> NanErrnoException(
1168+
NAN_INLINE v8::Local<v8::Value> ErrnoException(
11611169
int errorno
11621170
, const char* syscall = NULL
11631171
, const char* message = NULL
11641172
, const char* path = NULL) {
11651173
return node::ErrnoException(errorno, syscall, message, path);
11661174
}
11671175

1176+
NAN_DEPRECATED NAN_INLINE v8::Local<v8::Value> NanErrnoException(
1177+
int errorno
1178+
, const char* syscall = NULL
1179+
, const char* message = NULL
1180+
, const char* path = NULL) {
1181+
return ErrnoException(errorno, syscall, message, path);
1182+
}
1183+
11681184

11691185
template<typename T>
11701186
NAN_INLINE void SetIsolateData(

0 commit comments

Comments
 (0)