string replacement, better exception names

This commit is contained in:
Wolfgang Hottgenroth
2021-12-15 14:58:24 +01:00
parent 7b039b4fa4
commit 0f4c509b13
5 changed files with 90 additions and 22 deletions

View File

@ -82,7 +82,7 @@ $inputType['type']#slurp
$inputType['name']#slurp
#set sep = ', '
#end for
#end if
#end if
) {
#if $operation['paramInputTypes']
${operation['func']}InputType paramInput = new ${operation['func']}InputType();
@ -126,6 +126,12 @@ paramInput#slurp
#else
null#slurp
#end if
, #slurp
#if $operation['bindingByStringReplacement']
true#slurp
#else
false#slurp
#end if
);
return new ObjectResult(res#slurp
#if not $operation['isList']
@ -138,13 +144,10 @@ null#slurp
var err = new ErrorResultObject();
err.ErrorCode = $errDef['ErrorCode'];
err.ServiceErrorCode = $errDef['ServiceErrorCode'];
err.ErrorMessage = #slurp
#if $errDef['ErrorMessage'] == 'INSERT_EXCEPTION_MESSAGE'
ex.ToString();
#else
"$errDef['ErrorMessage']";
#end if
err.ErrorMessage = "$errDef['ErrorMessage']";
err.ErrorInfoURL = "$errDef['ErrorInfoURL']";
err.CaughtException = ex.ToString();
err.CaughtExceptionMessage = ex.Message;
err.OffensiveData = #slurp
#if $operation['bodyInputType']
Newtonsoft.Json.JsonConvert.SerializeObject($operation['bodyInputType']['apiName'], Newtonsoft.Json.Formatting.Indented);