@@ -18,6 +18,7 @@ export const QError_useMethodOutsideContext = 14;
1818export const QError_missingRenderCtx = 15 ;
1919export const QError_missingDoc = 16 ;
2020export const QError_immutableProps = 17 ;
21+ export const QError_hostCanOnlyBeAtRoot = 18 ;
2122
2223export const qError = ( code : number , ...parts : any [ ] ) : Error => {
2324 const text = codeToText ( code ) ;
@@ -29,23 +30,25 @@ export const qError = (code: number, ...parts: any[]): Error => {
2930export const codeToText = ( code : number ) : string => {
3031 if ( qDev ) {
3132 const MAP = [
32- 'Can not serialize a HTML Node that is not an Element' ,
33- 'Rruntime but no instance found on element.' ,
34- 'Only primitive and object literals can be serialized' ,
35- 'Crash while rendering' ,
36- 'You can render over a existing q:container. Skipping render().' ,
37- 'Set property' ,
38- "Only function's and 'string's are supported." ,
39- "Only objects can be wrapped in 'QObject'" ,
40- `Only objects literals can be wrapped in 'QObject'` ,
41- 'QRL is not a function' ,
42- 'Dynamic import not found' ,
43- 'Unknown type argument' ,
44- 'not found state for useContext' ,
45- "Q-ERROR: invoking 'use*()' method outside of invocation context." ,
46- 'Cant access renderCtx for existing context' ,
47- 'Cant access document for existing context' ,
48- 'props are inmutable' ,
33+ 'Error while serializing class attribute' , // 0
34+ 'Can not serialize a HTML Node that is not an Element' , // 1
35+ 'Rruntime but no instance found on element.' , // 2
36+ 'Only primitive and object literals can be serialized' , // 3
37+ 'Crash while rendering' , // 4
38+ 'You can render over a existing q:container. Skipping render().' , // 5
39+ 'Set property' , // 6
40+ "Only function's and 'string's are supported." , // 7
41+ "Only objects can be wrapped in 'QObject'" , // 8
42+ `Only objects literals can be wrapped in 'QObject'` , // 9
43+ 'QRL is not a function' , // 10
44+ 'Dynamic import not found' , // 11
45+ 'Unknown type argument' , // 12
46+ 'not found state for useContext' , // 13
47+ "Invoking 'use*()' method outside of invocation context." , // 14
48+ 'Cant access renderCtx for existing context' , // 15
49+ 'Cant access document for existing context' , // 16
50+ 'props are inmutable' , // 17
51+ '<Host> component can only be used at the root of a Qwik component$()' , // 18
4952 ] ;
5053 return `Code(${ code } ): ${ MAP [ code ] ?? '' } ` ;
5154 } else {
0 commit comments