mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-26 11:28:37 +00:00
Added throw CoreException to each method using Enum's fromInt function
This commit is contained in:
parent
ce7f650f40
commit
03a625226b
2 changed files with 2 additions and 1 deletions
|
|
@ -186,6 +186,7 @@ class JavaTranslator(object):
|
|||
|
||||
methodDict['enumCast'] = type(_method.returnType) is AbsApi.EnumType
|
||||
methodDict['classCast'] = type(_method.returnType) is AbsApi.ClassType
|
||||
|
||||
methodDict['params'] = ''
|
||||
methodDict['native_params'] = 'long nativePtr'
|
||||
methodDict['static_native_params'] = ''
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ class {{classImplName}} implements {{className}} {
|
|||
|
||||
{{#methods}}
|
||||
private native {{return_native}} {{name}}({{native_params}});
|
||||
public {{return}} {{name}}({{params}}) {{#exception}}throws CoreException{{/exception}} {
|
||||
public {{return}} {{name}}({{params}}) {{#exception}}throws CoreException{{/exception}}{{#enumCast}}throws CoreException{{/enumCast}} {
|
||||
{{#exception}}int exceptionResult = {{/exception}}{{return_keyword}}{{#enumCast}}{{return}}.fromInt({{/enumCast}}{{#classCast}}({{return}}){{/classCast}}{{name}}(nativePtr{{native_params_impl}}){{#enumCast}}){{/enumCast}};
|
||||
{{#exception}}if (exceptionResult != 0) throw new CoreException("{{name}} returned value " + exceptionResult){{/exception}}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue