Skip to content

Commit

Permalink
[engsys] fix core-util linter errors (#21391)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremymeng authored Apr 14, 2022
1 parent b3571fb commit d3e2b7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdk/core/core-util/src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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 {
Expand All @@ -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}`;
Expand Down
3 changes: 3 additions & 0 deletions sdk/core/core-util/src/random.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down

0 comments on commit d3e2b7f

Please sign in to comment.