Skip to content

Commit ad02846

Browse files
committed
chore: restore and deprecate MdError class
1 parent 3b81c69 commit ad02846

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/lib/core/core.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ export {MdLineModule, MdLine, MdLineSetter} from './line/line';
7676
// Style
7777
export * from './style/index';
7878

79+
// Error
80+
export {MdError} from './errors/error';
81+
7982
// Misc
8083
export {ComponentType} from './overlay/generic-component-type';
8184

src/lib/core/errors/error.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// TODO(kara): Revisit why error messages are not being properly set.
2+
3+
/**
4+
* Wrapper around Error that sets the error message.
5+
* @docs-private
6+
* @deprecated
7+
*/
8+
export class MdError extends Error {
9+
constructor(value: string) {
10+
super();
11+
this.message = value;
12+
}
13+
}

0 commit comments

Comments
 (0)