Skip to content

Commit c037eaf

Browse files
authored
feat(core): added symbol name to error (#5182)
1 parent bfe8040 commit c037eaf

File tree

1 file changed

+37
-33
lines changed
  • packages/qwik/src/core/container

1 file changed

+37
-33
lines changed

packages/qwik/src/core/container/pause.ts

+37-33
Original file line numberDiff line numberDiff line change
@@ -14,57 +14,57 @@ import { ELEMENT_ID, ELEMENT_ID_PREFIX, QContainerAttr, QScopedStyle } from '../
1414
import { qDev } from '../util/qdev';
1515

1616
import {
17-
destroyTask,
18-
isResourceTask,
19-
type ResourceReturnInternal,
20-
TaskFlagsIsDirty,
21-
} from '../use/use-task';
22-
import {
23-
qError,
2417
QError_containerAlreadyPaused,
2518
QError_missingObjectId,
2619
QError_verifySerializable,
20+
qError,
2721
} from '../error/error';
28-
import { isArray, isObject, isSerializableObject } from '../util/types';
29-
import { directGetAttribute, directSetAttribute } from '../render/fast-calls';
30-
import { isNotNullable, isPromise } from '../util/promises';
31-
import { collectDeps, serializeValue, UNDEFINED_PREFIX } from './serializers';
32-
import {
33-
type ContainerState,
34-
FILTER_REJECT,
35-
FILTER_SKIP,
36-
_getContainerState,
37-
type GetObjID,
38-
intToStr,
39-
SHOW_COMMENT,
40-
SHOW_ELEMENT,
41-
type SnapshotMeta,
42-
type SnapshotMetaValue,
43-
type SnapshotResult,
44-
} from './container';
22+
import { serializeQRLs } from '../qrl/qrl';
23+
import type { QRL } from '../qrl/qrl.public';
4524
import {
4625
processVirtualNodes,
4726
type QwikElement,
4827
type VirtualElement,
4928
} from '../render/dom/virtual-element';
50-
import { groupListeners } from '../state/listeners';
51-
import { serializeSStyle } from '../style/qrl-styles';
52-
import { serializeQRLs } from '../qrl/qrl';
29+
import { directGetAttribute, directSetAttribute } from '../render/fast-calls';
5330
import {
31+
LocalSubscriptionManager,
5432
fastSkipSerialize,
5533
fastWeakSerialize,
5634
getProxyFlags,
57-
getSubscriptionManager,
5835
getProxyTarget,
36+
getSubscriptionManager,
5937
isConnected,
60-
LocalSubscriptionManager,
6138
serializeSubscription,
6239
type Subscriptions,
6340
} from '../state/common';
64-
import { HOST_FLAG_DYNAMIC, type QContext, tryGetContext } from '../state/context';
65-
import { SignalImpl } from '../state/signal';
66-
import type { QRL } from '../qrl/qrl.public';
6741
import { QObjectImmutable, QObjectRecursive } from '../state/constants';
42+
import { HOST_FLAG_DYNAMIC, tryGetContext, type QContext } from '../state/context';
43+
import { groupListeners } from '../state/listeners';
44+
import { SignalImpl } from '../state/signal';
45+
import { serializeSStyle } from '../style/qrl-styles';
46+
import {
47+
TaskFlagsIsDirty,
48+
destroyTask,
49+
isResourceTask,
50+
type ResourceReturnInternal,
51+
} from '../use/use-task';
52+
import { isNotNullable, isPromise } from '../util/promises';
53+
import { isArray, isObject, isSerializableObject } from '../util/types';
54+
import {
55+
FILTER_REJECT,
56+
FILTER_SKIP,
57+
SHOW_COMMENT,
58+
SHOW_ELEMENT,
59+
_getContainerState,
60+
intToStr,
61+
type ContainerState,
62+
type GetObjID,
63+
type SnapshotMeta,
64+
type SnapshotMetaValue,
65+
type SnapshotResult,
66+
} from './container';
67+
import { UNDEFINED_PREFIX, collectDeps, serializeValue } from './serializers';
6868

6969
/**
7070
* @internal
@@ -259,7 +259,11 @@ export const _pauseFromContexts = async (
259259
for (const task of ctx.$tasks$) {
260260
if (qDev) {
261261
if (task.$flags$ & TaskFlagsIsDirty) {
262-
logWarn('Serializing dirty task. Looks like an internal error.');
262+
logWarn(
263+
`Serializing dirty task. Looks like an internal error.
264+
Task Symbol: ${task.$qrl$.$symbol$}
265+
`
266+
);
263267
}
264268
if (!isConnected(task)) {
265269
logWarn('Serializing disconnected task. Looks like an internal error.');

0 commit comments

Comments
 (0)