diff --git a/sdk/core/core-util/src/error.ts b/sdk/core/core-util/src/error.ts index cad9579ca294..d3da7067fc39 100644 --- a/sdk/core/core-util/src/error.ts +++ b/sdk/core/core-util/src/error.ts @@ -5,7 +5,7 @@ import { isObject } from "./object"; /** * Typeguard for an error object shape (has name and message) - * @param e Something caught by a catch clause. + * @param e - Something caught by a catch clause. */ export function isError(e: unknown): e is Error { if (isObject(e)) { @@ -19,7 +19,7 @@ export function isError(e: unknown): e is Error { /** * Given what is thought to be an error object, return the message if possible. * If the message is missing, returns a stringified version of the input. - * @param e Something thrown from a try{} block + * @param e - Something thrown from a try block * @returns The error message or a string of the input */ export function getErrorMessage(e: unknown): string { @@ -33,7 +33,7 @@ export function getErrorMessage(e: unknown): string { } else { stringified = String(e); } - } catch (e) { + } catch (err) { stringified = "[unable to stringify input]"; } return `Unknown error ${stringified}`; diff --git a/sdk/core/core-util/src/random.ts b/sdk/core/core-util/src/random.ts index 7733f250d223..3c0beeb2ff14 100644 --- a/sdk/core/core-util/src/random.ts +++ b/sdk/core/core-util/src/random.ts @@ -1,3 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + /** * Returns a random integer value between a lower and upper bound, * inclusive of both bounds.