Skip to content

Commit

Permalink
Update imports of rethrowAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
rcebulko committed Apr 16, 2021
1 parent c933e56 commit 3035417
Show file tree
Hide file tree
Showing 20 changed files with 33 additions and 21 deletions.
3 changes: 2 additions & 1 deletion 3p/3p.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@

// Note: loaded by 3p system. Cannot rely on babel polyfills.

import {devAssert, rethrowAsync, userAssert} from '../src/log';
import {devAssert, userAssert} from '../src/log';
import {hasOwn, map} from '../src/core/types/object';
import {isArray} from '../src/core/types';
import {rethrowAsync} from '../src/core/error';

/** @typedef {function(!Window, !Object)} */
let ThirdPartyFunctionDef;
Expand Down
3 changes: 2 additions & 1 deletion ads/vendors/yieldbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

import {getMultiSizeDimensions} from '../../ads/google/utils';
import {loadScript, validateData} from '../../3p/3p';
import {rethrowAsync, user} from '../../src/log';
import {rethrowAsync} from '../../src/core/error';
import {user} from '../../src/log';

/**
* @param {!Window} global
Expand Down
3 changes: 2 additions & 1 deletion extensions/amp-analytics/0.1/amp-analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ import {LinkerManager} from './linker-manager';
import {RequestHandler, expandPostMessage} from './requests';
import {Services} from '../../../src/services';
import {Transport} from './transport';
import {dev, devAssert, rethrowAsync, user} from '../../../src/log';
import {dev, devAssert, user} from '../../../src/log';
import {dict, hasOwn} from '../../../src/core/types/object';
import {expandTemplate} from '../../../src/core/types/string';
import {getMode} from '../../../src/mode';
import {installLinkerReaderService} from './linker-reader';
import {isArray, isEnumValue} from '../../../src/core/types';
import {rethrowAsync} from '../../../src/core/error';

import {isIframed} from '../../../src/dom';
import {isInFie} from '../../../src/iframe-helper';
Expand Down
3 changes: 2 additions & 1 deletion extensions/amp-app-banner/0.1/amp-app-banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

import {CSS} from '../../../build/amp-app-banner-0.1.css';
import {Services} from '../../../src/services';
import {dev, rethrowAsync, user, userAssert} from '../../../src/log';
import {dev, user, userAssert} from '../../../src/log';
import {dict} from '../../../src/core/types/object';
import {openWindowDialog, removeElement} from '../../../src/dom';
import {rethrowAsync} from '../../../src/core/error';

const TAG = 'amp-app-banner';
const OPEN_LINK_TIMEOUT = 1500;
Expand Down
3 changes: 2 additions & 1 deletion extensions/amp-fx-collection/0.1/amp-fx-collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ import {
FxType, // eslint-disable-line no-unused-vars
getFxTypes,
} from './fx-type';
import {devAssert, rethrowAsync} from '../../../src/log';
import {devAssert} from '../../../src/log';
import {
installPositionBoundFx,
installScrollToggledFx,
} from './providers/fx-provider';
import {iterateCursor} from '../../../src/dom';
import {listen} from '../../../src/event-helper';
import {rethrowAsync} from '../../../src/core/error';

const TAG = 'amp-fx-collection';

Expand Down
2 changes: 1 addition & 1 deletion extensions/amp-playbuzz/0.1/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
removeFragment,
serializeQueryString,
} from '../../../src/url';
import {rethrowAsync} from './../../../src/log';
import {rethrowAsync} from './../../../src/core/error';

/**
* Returns a function, that, as long as it continues to be invoked, will not
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ import {
} from '../../../src/service/notification-ui-manager';
import {Services} from '../../../src/services';
import {addParamsToUrl, assertHttpsUrl} from '../../../src/url';
import {dev, rethrowAsync, user, userAssert} from '../../../src/log';
import {dev, user, userAssert} from '../../../src/log';
import {dict} from '../../../src/core/types/object';
import {
getServicePromiseForDoc,
registerServiceBuilderForDoc,
} from '../../../src/service';
import {rethrowAsync} from '../../../src/core/error';
import {toggle} from '../../../src/style';

const TAG = 'amp-user-notification';
Expand Down
2 changes: 1 addition & 1 deletion src/context/scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import {rethrowAsync} from '../log';
import {rethrowAsync} from '../core/error';

/**
* Creates a scheduling function that executes the callback based on the
Expand Down
2 changes: 1 addition & 1 deletion src/context/values.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import {deepScan, findParent} from './scan';
import {pureDevAssert as devAssert} from '../core/assert';
import {pushIfNotExist, removeItem} from '../core/types/array';
import {rethrowAsync} from '../log';
import {rethrowAsync} from '../core/error';
import {throttleTail} from './scheduler';

const EMPTY_ARRAY = [];
Expand Down
3 changes: 2 additions & 1 deletion src/custom-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ import {
isCancellation,
reportError,
} from './error-reporting';
import {dev, devAssert, rethrowAsync, user, userAssert} from './log';
import {dev, devAssert, user, userAssert} from './log';
import {getIntersectionChangeEntry} from './utils/intersection-observer-3p-host';
import {getMode} from './mode';
import {getSchedulerForDoc} from './service/scheduler';
import {isExperimentOn} from './experiments';
import {rethrowAsync} from './core/error';
import {setStyle} from './style';
import {shouldBlockOnConsentByMeta} from './consent';
import {startupChunk} from './chunk';
Expand Down
3 changes: 2 additions & 1 deletion src/friendly-iframe-embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {Services} from './services';
import {Signals} from './utils/signals';
import {VisibilityState} from './core/constants/visibility-state';
import {cssText as ampSharedCss} from '../build/ampshared.css';
import {dev, devAssert, rethrowAsync, userAssert} from './log';
import {dev, devAssert, userAssert} from './log';
import {
disposeServicesForEmbed,
getTopWindow,
Expand All @@ -48,6 +48,7 @@ import {
setStyle,
setStyles,
} from './style';
import {rethrowAsync} from './core/error';
import {toWin} from './types';
import {urls} from './config';
import {whenContentIniLoad} from './ini-load';
Expand Down
3 changes: 2 additions & 1 deletion src/service/cid-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {GoogleCidApi, TokenStatus} from './cid-api';
import {Services} from '../services';
import {ViewerCidApi} from './viewer-cid-api';
import {base64UrlEncodeFromBytes} from '../utils/base64';
import {dev, rethrowAsync, user, userAssert} from '../log';
import {dev, user, userAssert} from '../log';
import {dict} from '../core/types/object';
import {getCookie, setCookie} from '../cookies';
import {getCryptoRandomBytesArray} from '../utils/bytes';
Expand All @@ -36,6 +36,7 @@ import {getSourceOrigin, isProxyOrigin, parseUrlDeprecated} from '../url';
import {isExperimentOn} from '../../src/experiments';
import {isIframed} from '../dom';
import {parseJson, tryParseJson} from '../json';
import {rethrowAsync} from '../core/error';
import {tryResolve} from '../core/data-structures/promise';

const ONE_DAY_MILLIS = 24 * 3600 * 1000;
Expand Down
3 changes: 2 additions & 1 deletion src/service/extensions-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ import {
upgradeOrRegisterElement,
} from './custom-element-registry';
import {createExtensionScript, getExtensionScripts} from './extension-script';
import {dev, devAssert, rethrowAsync} from '../log';
import {dev, devAssert} from '../log';
import {getMode} from '../mode';
import {installStylesForDoc} from '../style-installer';
import {map} from '../core/types/object';
import {registerExtendedTemplateForDoc} from './template-impl';
import {registerServiceBuilder, registerServiceBuilderForDoc} from '../service';
import {rethrowAsync} from '../core/error';

export const LEGACY_ELEMENTS = ['amp-ad', 'amp-embed', 'amp-video'];
const TAG = 'extensions';
Expand Down
3 changes: 2 additions & 1 deletion src/service/url-expander/expander.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
*/

import {hasOwn} from '../../core/types/object';
import {rethrowAsync, user} from '../../log';
import {rethrowAsync} from '../../core/error';
import {trimStart} from '../../core/types/string';
import {tryResolve} from '../../core/data-structures/promise';
import {user} from '../../log';

/** @private @const {string} */
const PARSER_IGNORE_FLAG = '`';
Expand Down
3 changes: 2 additions & 1 deletion src/service/vsync-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ import {
removeDocumentVisibilityChangeListener,
} from '../utils/document-visibility';
import {cancellation} from '../error-reporting';
import {dev, devAssert, rethrowAsync} from '../log';
import {dev, devAssert} from '../log';
import {getService, registerServiceBuilder} from '../service';
import {installTimerService} from './timer-impl';
import {rethrowAsync} from '../core/error';

/** @const {time} */
const FRAME_TIME = 16;
Expand Down
3 changes: 2 additions & 1 deletion src/style-installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
import {CommonSignals} from './core/constants/common-signals';
import {Services} from './services';
import {TickLabel} from './core/constants/enums';
import {dev, devAssert, rethrowAsync} from './log';
import {dev, devAssert} from './log';
import {getAmpdoc} from './service';
import {insertAfterOrAtStart, waitForBodyOpenPromise} from './dom';
import {map} from './core/types/object';
import {rethrowAsync} from './core/error';
import {setStyles} from './style';
import {waitForServices} from './render-delaying-services';

Expand Down
2 changes: 1 addition & 1 deletion src/utils/display-observer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {VisibilityState} from '../core/constants/visibility-state';
import {containsNotSelf} from '../dom';
import {getServiceForDoc, registerServiceBuilderForDoc} from '../service';
import {pushIfNotExist, removeItem} from '../core/types/array';
import {rethrowAsync} from '../log';
import {rethrowAsync} from '../core/error';

const SERVICE_ID = 'DisplayObserver';

Expand Down
2 changes: 1 addition & 1 deletion src/utils/resource-container-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import {rethrowAsync} from '../log';
import {rethrowAsync} from '../core/error';

const AMP_CLASS = 'i-amphtml-element';
const DEEP = true;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/size-observer.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import {computedStyle} from '../style';
import {remove} from '../core/types/array';
import {rethrowAsync} from '../log';
import {rethrowAsync} from '../core/error';
import {toWin} from '../types';

/** @enum {number} */
Expand Down
3 changes: 1 addition & 2 deletions test/unit/test-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ import {
devAssert,
isUserErrorEmbed,
isUserErrorMessage,
rethrowAsync,
setReportError,
user,
userAssert,
} from '../../src/log';
import {duplicateErrorIfNecessary} from '../../src/core/error';
import {duplicateErrorIfNecessary, rethrowAsync} from '../../src/core/error';

describe('Logging', () => {
const RETURNS_FINE = () => LogLevel.FINE;
Expand Down

0 comments on commit 3035417

Please sign in to comment.