Skip to content

Commit 1aac3a8

Browse files
flamenco: fix custom error logging
1 parent 6c6b955 commit 1aac3a8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
464d28588c99aa40406b079888cf0bf71030a3a6
1+
ccc072117ee98bb84fe4d653c62ff28b010c11d6

src/flamenco/log_collector/fd_log_collector.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,8 @@ fd_log_collector_program_failure( fd_exec_instr_ctx_t * ctx ) {
465465
char custom_err[33] = { 0 };
466466
const char * err = custom_err;
467467
const fd_exec_txn_ctx_t * txn_ctx = ctx->txn_ctx;
468-
if( FD_UNLIKELY( txn_ctx->custom_err!=0U ) ) {
468+
if( FD_UNLIKELY( txn_ctx->exec_err_kind==FD_EXECUTOR_ERR_KIND_INSTR &&
469+
txn_ctx->exec_err==FD_EXECUTOR_INSTR_ERR_CUSTOM_ERR ) ) {
469470
/* Max msg_sz = 32 <= 66 */
470471
snprintf( custom_err, sizeof(custom_err), "custom program error: 0x%x", txn_ctx->custom_err );
471472
} else if( txn_ctx->exec_err ) {

0 commit comments

Comments
 (0)