Skip to content

Commit 656b5d3

Browse files
danieljancarAndrewKushnir
authored andcommitted
fix(core): Re-assign error codes to be within core bounds (<1000) (angular#53455)
`RUNTIME_DEPS_INVALID_IMPORTED_TYPE` is now 980 `RUNTIME_DEPS_ORPHAN_COMPONENT` is now 981 PR Close angular#53455
1 parent d9dc41a commit 656b5d3

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

goldens/public-api/core/errors.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ export const enum RuntimeErrorCode {
135135
// (undocumented)
136136
REQUIRED_QUERY_NO_VALUE = -951,
137137
// (undocumented)
138-
RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 1000,
138+
RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 980,
139139
// (undocumented)
140-
RUNTIME_DEPS_ORPHAN_COMPONENT = 1001,
140+
RUNTIME_DEPS_ORPHAN_COMPONENT = 981,
141141
// (undocumented)
142142
SIGNAL_WRITE_FROM_ILLEGAL_CONTEXT = 600,
143143
// (undocumented)

packages/core/src/errors.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,10 @@ export const enum RuntimeErrorCode {
132132
LOOP_TRACK_RECREATE = -956,
133133

134134
// Runtime dependency tracker errors
135-
RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 1000,
136-
RUNTIME_DEPS_ORPHAN_COMPONENT = 1001,
135+
RUNTIME_DEPS_INVALID_IMPORTED_TYPE = 980,
136+
RUNTIME_DEPS_ORPHAN_COMPONENT = 981,
137+
138+
// Upper bounds for core runtime errors is 999
137139
}
138140

139141
/**

packages/core/test/linker/integration_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2050,7 +2050,7 @@ describe('integration tests', function () {
20502050

20512051
TestBed.configureTestingModule({declarations: [MainComp]});
20522052
expect(() => TestBed.createComponent(MainComp)).toThrowError(
2053-
/^NG01001: Orphan component found\! Trying to render the component MainComp \(at test\.ts:11\) without first loading the NgModule that declares it/,
2053+
/^NG0981: Orphan component found\! Trying to render the component MainComp \(at test\.ts:11\) without first loading the NgModule that declares it/,
20542054
);
20552055
});
20562056

0 commit comments

Comments
 (0)