mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
UnionType.ts: Improve error message on failed conversions.
Closes https://github.com/tridactyl/tridactyl/issues/1146.
This commit is contained in:
parent
7c690d460a
commit
dfbae7ed06
1 changed files with 1 additions and 5 deletions
|
@ -24,10 +24,6 @@ export class UnionType implements Type {
|
|||
return t.convert(argument)
|
||||
} catch (e) {}
|
||||
}
|
||||
throw new Error(
|
||||
`Can't convert argument to any of types: ${argument}, ${
|
||||
this.types
|
||||
}`,
|
||||
)
|
||||
throw new Error(`Can't convert "${argument}" to any of: ${this.types}`)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue