File tree Expand file tree Collapse file tree 1 file changed +20
-15
lines changed
src/Controllers/Examples/eSignature Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Original file line number Diff line number Diff line change 77
88use DocuSign \Controllers \eSignBaseController ;
99use DocuSign \Services \Examples \eSignature \DocumentGenerationService ;
10+ use DocuSign \eSign \Client \ApiException ;
1011use DocuSign \Services \ManifestService ;
1112
1213class EG042DocumentGeneration extends eSignBaseController
@@ -36,22 +37,26 @@ public function createController(): void
3637 {
3738 $ this ->checkDsToken ();
3839
39- $ envelopeId = DocumentGenerationService::worker (
40- $ this ->args ,
41- $ this ->clientService ,
42- self ::DEMO_DOCS_PATH
43- );
44-
45- if ($ envelopeId ) {
46- $ this ->clientService ->showDoneTemplateFromManifest (
47- $ this ->codeExampleText ,
48- null ,
49- ManifestService::replacePlaceholders (
50- "{0} " ,
51- $ envelopeId ,
52- $ this ->codeExampleText ["ResultsPageText " ]
53- )
40+ try {
41+ $ envelopeId = DocumentGenerationService::worker (
42+ $ this ->args ,
43+ $ this ->clientService ,
44+ self ::DEMO_DOCS_PATH
5445 );
46+
47+ if ($ envelopeId ) {
48+ $ this ->clientService ->showDoneTemplateFromManifest (
49+ $ this ->codeExampleText ,
50+ null ,
51+ ManifestService::replacePlaceholders (
52+ "{0} " ,
53+ $ envelopeId ,
54+ $ this ->codeExampleText ["ResultsPageText " ]
55+ )
56+ );
57+ }
58+ } catch (ApiException $ e ) {
59+ $ this ->clientService ->showErrorTemplate ($ e );
5560 }
5661 }
5762
You can’t perform that action at this time.
0 commit comments