Skip to content

Commit e261013

Browse files
author
Github Executorch
committed
Summary: Throw Executorch exception which is mapped to underlying native error code
Test Plan: Tested with executorch-examples Reviewers: Subscribers: Tasks: Tags:
1 parent c28a0b4 commit e261013

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

extension/android/jni/jni_layer.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,7 @@ class ExecuTorchJni : public facebook::jni::HybridClass<ExecuTorchJni> {
308308
<< std::uppercase << static_cast<uint32_t>(result) << "]";
309309

310310
jni_helper::throwExecutorchException(
311-
static_cast<uint32_t>(
312-
Error::InvalidArgument), // For backward compatibility
313-
ss.str());
311+
static_cast<uint32_t>(result), ss.str());
314312
return {};
315313
}
316314
auto&& underlying_method = module_->methods_[method].method;
@@ -460,9 +458,7 @@ class ExecuTorchJni : public facebook::jni::HybridClass<ExecuTorchJni> {
460458
<< "]";
461459

462460
jni_helper::throwExecutorchException(
463-
static_cast<uint32_t>(
464-
Error::InvalidArgument), // For backward compatibility
465-
ss.str());
461+
static_cast<uint32_t>(Error::InvalidArgument), ss.str());
466462
return {};
467463
}
468464
const auto& methods = names_result.get();

0 commit comments

Comments
 (0)