Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Проверка аргументов ссылочных типов конструктора на валидность #246

Open
ava57r opened this issue Apr 8, 2018 · 2 comments

Comments

@ava57r
Copy link
Member

ava57r commented Apr 8, 2018

  1. Для локализации ошибок.
  2. Устранение необходимости проверки на валидность после инициализации класса.
@dmpas
Copy link
Collaborator

dmpas commented Apr 8, 2018

ничо не понял

@ava57r
Copy link
Member Author

ava57r commented Apr 8, 2018

Вот смотри

V8Catalog::V8Catalog(V8File* f) // конструктор каталога

// Потом такой код. А если nullptr?
file = f;
Lock = file->get_lock();
Lock->Acquire();
file->open();
data = file->get_data();

Вот надо проверку делать на старте, а если nullptr, то argumentexeption

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants