Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.13.0
9 changes: 8 additions & 1 deletion src/services/error-handler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { HttpError } from '~/api/http-error'
import { ApiResponseError, OndemandApiNotEnabledError, UnsupportedTickerError } from '~/custom-functions/error'
import {
ApiResponseError,
OndemandApiNotEnabledError,
PropertyNotFoundError,
UnsupportedTickerError
} from '~/custom-functions/error'
import { InvalidLYLQError, InvalidYearError, InvalidQuarterError } from '~/fiscal-periods/error'

export class ErrorHandler {
Expand All @@ -18,6 +23,8 @@ export class ErrorHandler {
throw new Error(`<<無効な決算年度が指定されています>>`)
} else if (e instanceof InvalidQuarterError) {
throw new Error(`<<無効な四半期が指定されています>>`)
} else if (e instanceof PropertyNotFoundError) {
throw new Error(`<<サポートされていない科目です>>`)
} else {
console.error('未定義のエラー', e.name, e.message)
throw new Error(
Expand Down