Method code for $sys.create()

[Turn off line numbering]
  1: arg parents, name, manager;
  2: var new;
  3: 
  4: new = create(parents);
  5: catch any {
  6:     new.initialize();
  7: 
  8:     // niggle the names around... $has_name may have initted the wrong name
  9:     new.set_objname(name);
 10:     if (new.has_ancestor($has_name) && new.name() == "#" + new.objnum()) {
 11:         catch ~invname
 12:             new.set_name(substr(tostr(new), 2));
 13:     }
 14: 
 15:     // let it manage itself
 16:     new.change_manager(manager);
 17: } with {
 18:     // Failed to initialize the child; destroy it.
 19:     $sys.log_traceback(traceback(), "CREATE (" + parents + ", '" + name + ", " + manager + ")");
 20:     (| new.destroy() |);
 21:     rethrow(error());
 22: }
 23: return new;

["// Created 26-Mar-1995 as a part of ColdCore, see: @help Credit"]

the Cold Dark