Skip to content

Commit 3a732e8

Browse files
committed
[js] Throw proper exception instead of throwing because of a bug
1 parent 59dcb59 commit 3a732e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vm/js/nqp-runtime/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ const intToObj = exports.intToObj = function(currentHLL, i) {
212212
exports.int64ToObj = function(currentHLL, i) {
213213
const type = currentHLL.get('int_box');
214214
if (!type) {
215-
return new NQPInt(i);
215+
throw new NQPException(`Can't box 64 bit integer: HLL doesn't have int_box`);
216216
} else {
217217
const repr = type._STable.REPR;
218218
const obj = repr.allocate(type._STable);

0 commit comments

Comments
 (0)