Implement error return documetation
Adds ability to add error return documetation to the binder and class reference.
Usage example:
```C++
void MyClass::_bind_method() {
[..]
BIND_METHOD_ERR_RETURN_DOC("load", ERR_FILE_CANT_OPEN, ERR_FILE_UNRECOGNIZED);
}
```
One function of ConfigFile was changed as example.
This commit is contained in:
parent
ca7f53dd25
commit
96f8254b24
7 changed files with 106 additions and 1 deletions
|
|
@ -315,6 +315,8 @@ void ConfigFile::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("parse", "data"), &ConfigFile::parse);
|
||||
ClassDB::bind_method(D_METHOD("save", "path"), &ConfigFile::save);
|
||||
|
||||
BIND_METHOD_ERR_RETURN_DOC("load", ERR_FILE_CANT_OPEN);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("load_encrypted", "path", "key"), &ConfigFile::load_encrypted);
|
||||
ClassDB::bind_method(D_METHOD("load_encrypted_pass", "path", "password"), &ConfigFile::load_encrypted_pass);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue