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 7
7
8
8
use DocuSign \Controllers \eSignBaseController ;
9
9
use DocuSign \Services \Examples \eSignature \DocumentGenerationService ;
10
+ use DocuSign \eSign \Client \ApiException ;
10
11
use DocuSign \Services \ManifestService ;
11
12
12
13
class EG042DocumentGeneration extends eSignBaseController
@@ -36,22 +37,26 @@ public function createController(): void
36
37
{
37
38
$ this ->checkDsToken ();
38
39
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
54
45
);
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 );
55
60
}
56
61
}
57
62
You can’t perform that action at this time.
0 commit comments