Skip to content

Commit 2a6bcc7

Browse files
[nanoPOCL] Re-enable error reporting in 1.12+ #674 (#681)
1 parent 788f4c4 commit 2a6bcc7

1 file changed

Lines changed: 10 additions & 16 deletions

File tree

src/pocl/device/runtime.jl

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,23 @@ report_oom(sz) = return
1010
import SPIRVIntrinsics: get_global_id
1111

1212
function 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
2018
end
2119

2220
function 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
3127
end
3228

3329
function 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
3832
end

0 commit comments

Comments
 (0)