Skip to content

Commit 253def5

Browse files
committed
Update CONTRIBUTING.md
1 parent 5fae717 commit 253def5

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

CONTRIBUTING.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ Example for an encoder:
321321
```postscript
322322
/encoder {
323323
20 dict begin
324+
{ % stopped context for error cleanup
324325
325326
%
326327
% 1. Option defaults
@@ -376,6 +377,7 @@ Example for an encoder:
376377
%
377378
dontdraw not //renlinear if
378379
380+
} stopped {end stop} if % Prevent dict stack leak on error
379381
end
380382
}
381383
[/barcode] {null def} forall % Inhibit binding of non-standard operators defined on some RIPs
@@ -395,7 +397,11 @@ To avoid orphaning stack entries when a resource does not run to completion —
395397
as when another resource invokes `raiseerror` — resources must execute other
396398
resources only with a clean stack.
397399

398-
Any example is "wrapper encoders" that delegate to another encoder with
400+
To avoid leaving entries on the dict stack when an error is raised, each
401+
resource's `stopped` context catches the `stop` from `raiseerror`, and then
402+
runs `{end stop}` to close the dictionary and re-propagate.
403+
404+
An example is "wrapper encoders" that delegate to another encoder with
399405
modified options:
400406

401407
```postscript
@@ -1006,7 +1012,6 @@ Unreachable due to earlier validation:
10061012
- `GS1UnknownCSET82Character` - `lintcset82` catches first
10071013
- `GS1alphaTooLong` - max length fits primes array
10081014
- `GS1requiresNonDigit` - checksum requires non-digits
1009-
- `colorFailedToSet` - valid colors work; error path has stack cleanup issues
10101015

10111016

10121017
## Documentation

0 commit comments

Comments
 (0)