Symptom
An alert box with this error message appears after you print AppleScript text from the Script Editor application program:
"Could not print the document because of a program error."
Although the error message says the document could not be printed, it actually is printed.
Solution
You can safely ignore this error message.
The alert box is displayed as a result of changes made to the printing code in CarbonLib 1.1. CarbonLib 1.1 or later may have been installed as part of another software package. To verify, check the version of the CarbonLib system extension in the Extensions folder.
This may be addressed in a future update to AppleScript.