File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,16 @@ use crate::surface::GPUCanvasContext;
24
24
25
25
#[ derive( Debug , thiserror:: Error , deno_error:: JsError ) ]
26
26
pub enum ByowError {
27
+ #[ cfg( not( any(
28
+ target_os = "macos" ,
29
+ target_os = "windows" ,
30
+ target_os = "linux" ,
31
+ target_os = "freebsd" ,
32
+ target_os = "openbsd" ,
33
+ ) ) ) ]
34
+ #[ class( type ) ]
35
+ #[ error( "Unsupported platform" ) ]
36
+ Unsupported ,
27
37
#[ class( type ) ]
28
38
#[ error(
29
39
"Cannot create surface outside of WebGPU context. Did you forget to call `navigator.gpu.requestAdapter()`?"
@@ -360,6 +370,6 @@ fn raw_window(
360
370
_system : UnsafeWindowSurfaceSystem ,
361
371
_window : * const c_void ,
362
372
_display : * const c_void ,
363
- ) -> Result < RawHandles , deno_error :: JsErrorBox > {
364
- Err ( deno_error :: JsErrorBox :: type_error ( " Unsupported platform" ) )
373
+ ) -> Result < RawHandles , ByowError > {
374
+ Err ( ByowError :: Unsupported )
365
375
}
You can’t perform that action at this time.
0 commit comments