We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7429bc9 commit 207308eCopy full SHA for 207308e
packages/shared/src/error/QiankunError.ts
@@ -1,12 +1,13 @@
1
export class QiankunError extends Error {
2
- constructor(message: string) {
3
- super(`[qiankun]: ${message}`);
4
- }
5
-}
6
-
7
-export class QiankunError2 extends Error {
8
constructor(code: number, message: string, ...args: string[]) {
9
- super(`[qiankun #${code}]: ${message ? message + " " : ""}See https://qiankun.umijs.org/error/?code=${code}${args.length ? `&arg=${args.join("&arg=")}` : ""
10
- }`);
+ let errorMessage = `[qiankun #${code}]: ${message ? message + ' ' : ''}`;
+ if (process.env.NODE_ENV === 'production') {
+ errorMessage += `See https://qiankun.umijs.org/error/?code=${code}${
+ args.length ? `&arg=${args.join('&arg=')}` : ''
+ }`;
+ } else {
+ console.warn('args', ...args)
+ }
11
+ super(errorMessage);
12
}
13
0 commit comments