Skip to content

Commit

Permalink
Improve scc message
Browse files Browse the repository at this point in the history
  • Loading branch information
mantas-done committed Apr 5, 2024
1 parent 4cd77fb commit d05dfea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Code/Converters/SccConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public static function splitLongLines($lines, $output_settings)
$new_lines = [];
if (mb_strlen($lines[0]) > 32) {
if (isset($output_settings['strict']) && $output_settings['strict']) {
throw new UserException('Line should be up to 32 characters: "' . $lines[0] . '"');
throw new UserException('SCC format supports lines up to 32 characters, this line is longer: "' . $lines[0] . '"');
}
$tmp_lines = explode("\n", Helpers::mb_wordwrap($lines[0], 32, "\n", true));
if (isset($tmp_lines[2])) {
Expand All @@ -269,7 +269,7 @@ public static function splitLongLines($lines, $output_settings)
if (isset($lines[1])) {
if (mb_strlen($lines[1]) > 32) {
if (isset($output_settings['strict']) && $output_settings['strict']) {
throw new UserException('Line should be up to 32 characters: "' . $lines[1] . '"');
throw new UserException('SCC format supports lines up to 32 characters, this line is longer: "' . $lines[1] . '"');
}
$tmp_lines = explode("\n", Helpers::mb_wordwrap($lines[1], 32, "\n", true));
if (isset($tmp_lines[2])) {
Expand Down

0 comments on commit d05dfea

Please sign in to comment.