src: update UNREACHABLE macro to take a string · nodejs/node@d21e066 · GitHub
Skip to content

Commit d21e066

Browse files
nitsakhtargos
authored andcommitted
src: update UNREACHABLE macro to take a string
PR-URL: #26502 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
1 parent 206ae31 commit d21e066

3 files changed

Lines changed: 15 additions & 9 deletions

File tree

src/node_crypto.cc

Lines changed: 1 addition & 1 deletion

src/node_file.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ template <typename NativeT,
162162
constexpr NativeT ToNative(uv_timespec_t ts) {
163163
// This template has exactly two specializations below.
164164
static_assert(std::is_arithmetic<NativeT>::value == false, "Not implemented");
165-
UNREACHABLE();
165+
return NativeT();
166166
}
167167

168168
template <>

src/util.h

Lines changed: 13 additions & 7 deletions

0 commit comments

Comments
 (0)