Skip to content

Commit 605b23d

Browse files
committedNov 29, 2022
Explicitly suggest wrapping in a try/catch block
1 parent 8f05fcd commit 605b23d

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed
 

‎lib/workflow.js

+5-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎lib/workflow.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/workflow.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export function getWorkflowRunID(): number {
293293
return workflowRunID;
294294
}
295295

296-
export function getStepsCallingAction(
296+
function getStepsCallingAction(
297297
job: WorkflowJob,
298298
actionName: string
299299
): WorkflowJobStep[] {
@@ -310,6 +310,8 @@ export function getStepsCallingAction(
310310
* Makes a best effort attempt to retrieve the value of a particular input with which
311311
* an Action in the workflow would be invoked.
312312
*
313+
* Typically you'll want to wrap this function in a try/catch block and handle the error.
314+
*
313315
* @returns the value of the input, or undefined if no such input is passed to the Action
314316
* @throws an error if the value of the input could not be determined, or we could not
315317
* determine that no such input is passed to the Action.
@@ -366,6 +368,8 @@ function getInputOrThrow(
366368
* Makes a best effort attempt to retrieve the category input for the particular job,
367369
* given a set of matrix variables.
368370
*
371+
* Typically you'll want to wrap this function in a try/catch block and handle the error.
372+
*
369373
* @returns the category input, or undefined if the category input is not defined
370374
* @throws an error if the category input could not be determined
371375
*/

0 commit comments

Comments
 (0)
Please sign in to comment.