I need to add a control inside changeCompany()to an existing class.
changeCompany()
I believe that the code below is OK, but I have doubts: does “return” mean returning to the original company? Or do I need to add an expression unknown to me, something like revertToPreviousCompany()?
revertToPreviousCompany()
try { changeCompany(companyId) { // the method will produce a message and return false if an error if (!this.doSomeChecks()) { return; } // much more code below
, , , .-, try - catch , , , , , , , , changeCompany
try
catch
changeCompany
Source: https://habr.com/ru/post/1653310/More articles:Inferior Shell or UIOP: interacting with the background process - lispAdd Alamofire as a dependency through Swift 3 Package Manager - swiftПостроение малых кратных с петлей for в R - rReading a partition delimiter using getchar () - cWhen the input field is full, the label still falls - javascriptHow to fill form array in Angular 2? - javascriptUnexpected Token Import - Responsive - javascriptProperty import types are incompatible when using routing - angularjsHow to prevent loading parent component of preen in angular 2 during routing? - javascriptHow can I start and stop the service remotely - c #All Articles