There's a couple of bits of text that indicate that sessions may reject layers for various reasons[1][2], but there's no indication of a spot and/or type of exception that should be thrown in the creation algorithm.
[1] At the end of section 6.1:
Some layer types may not be supported by the XRSession. If a layer type isn’t supported the method will throw an exception. XRProjectionLayer MUST be supported by all XRSessions.
[2] Section 12.2:
The user agent MAY put limits on any resource allocation such as the maximum pixel size or the number of layers to reduce the identifiability of the GPU hardware.
Note that for [2], no prose is written for either restricting the size or due to the number of layers.
There's a couple of bits of text that indicate that sessions may reject layers for various reasons[1][2], but there's no indication of a spot and/or type of exception that should be thrown in the creation algorithm.
[1] At the end of section 6.1:
[2] Section 12.2:
Note that for [2], no prose is written for either restricting the size or due to the number of layers.