if (!strlen($path) || $path[0] != '/') { throw new Exception("Path '{$path}' defined on line #{$line_no} is invalid. Paths should " . "begin with '/' and specify a path from the root of the project, like " . "'/src/utils/utils.php'."); } $symbols[] = array('ctxt' => $context, 'name' => $name, 'type' => $type, 'lang' => $lang, 'line' => $line_number, 'path' => $path); } catch (Exception $e) { if ($args->getArg('ignore-errors')) { continue; } else { throw $e; } } if (count($symbols) >= $args->getArg('max-transaction')) { try { echo "Committing {$args->getArg('max-transaction')} symbols....\n"; commit_symbols($symbols, $project, $no_purge); $no_purge = true; unset($symbols); $symbols = array(); } catch (Exception $e) { if ($args->getArg('ignore-errors')) { continue; } else { throw $e; } } } } if (count($symbols)) { commit_symbols($symbols, $project, $no_purge); } echo "Done.\n";
if (!strlen($path) || $path[0] != '/') { throw new Exception(pht("Path '%s' defined on line #%d is invalid. Paths should begin with " . "'%s' and specify a path from the root of the project, like '%s'.", $path, $line_no, '/', '/src/utils/utils.php')); } $symbols[] = array('ctxt' => $context, 'name' => $name, 'type' => $type, 'lang' => $lang, 'line' => $line_number, 'path' => $path); } catch (Exception $e) { if ($args->getArg('ignore-errors')) { continue; } else { throw $e; } } if (count($symbols) >= $args->getArg('max-transaction')) { try { echo pht("Committing %s symbols...\n", new PhutilNumber($args->getArg('max-transaction'))); commit_symbols($symbols, $repository, $no_purge); $no_purge = true; unset($symbols); $symbols = array(); } catch (Exception $e) { if ($args->getArg('ignore-errors')) { continue; } else { throw $e; } } } } if (count($symbols)) { commit_symbols($symbols, $repository, $no_purge); } echo pht('Done.') . "\n";