@@ -10,29 +10,23 @@ report_oom(sz) = return
1010import SPIRVIntrinsics: get_global_id
1111
1212function report_exception (ex)
13- @static if VERSION < v " 1.12"
14- SPIRVIntrinsics. @printf (
15- " ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n " ,
16- ex, get_global_id (UInt32 (1 )), get_global_id (UInt32 (2 )), get_global_id (UInt32 (3 ))
17- )
18- end
13+ SPIRVIntrinsics. @printf (
14+ " ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n " ,
15+ ex, get_global_id (UInt32 (1 )), get_global_id (UInt32 (2 )), get_global_id (UInt32 (3 ))
16+ )
1917 return
2018end
2119
2220function report_exception_name (ex)
23- @static if VERSION < v " 1.12"
24- SPIRVIntrinsics. @printf (
25- " ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n " ,
26- ex, get_global_id (UInt32 (1 )), get_global_id (UInt32 (2 )), get_global_id (UInt32 (3 ))
27- )
28- SPIRVIntrinsics. @printf (" Stacktrace:\n " )
29- end
21+ SPIRVIntrinsics. @printf (
22+ " ERROR: a %s was thrown during kernel execution on thread (%d, %d, %d).\n " ,
23+ ex, get_global_id (UInt32 (1 )), get_global_id (UInt32 (2 )), get_global_id (UInt32 (3 ))
24+ )
25+ SPIRVIntrinsics. @printf (" Stacktrace:\n " )
3026 return
3127end
3228
3329function report_exception_frame (idx, func, file, line)
34- @static if VERSION < v " 1.12"
35- SPIRVIntrinsics. @printf (" [%d] %s at %s:%d\n " , idx, func, file, line)
36- end
30+ SPIRVIntrinsics. @printf (" [%d] %s at %s:%d\n " , idx, func, file, line)
3731 return
3832end
0 commit comments