Skip to content

Commit

Permalink
Improve JSONConverter exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Oct 10, 2024
1 parent 0e27a09 commit a893946
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/JsonConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,7 @@ public function save(iterable $records, mixed $destination, $context = null): in
}
restore_error_handler();

if (false === $writtenBytes) {
throw new RuntimeException('Unable to write to the stream.');
}
false !== $writtenBytes || throw new RuntimeException('Unable to write '.(isset($line) ? '`'.$line.'`' : '').' to the destination path.');

return $bytes;
}
Expand Down

0 comments on commit a893946

Please sign in to comment.