FS error not documented?

Hello MicroEJ team,

I implemented the File System library on my platform and ran the FS testsuite from the PlatformQualificationTools on github.

I’m encountering an error (-12) but it doesn’t seem to be documented in the error messages on this page: FS — MicroEJ Documentation

Here is my testsuite log:

[testsuite:javaTestsuite] [traceAnalyzer:socketTraceAnalyzer] **TestWriteBigFile
[testsuite:javaTestsuite] [traceAnalyzer:socketTraceAnalyzer] Exception in thread "main" ej.sni.NativeIOException: Creation failed (error code=-12)
[testsuite:javaTestsuite] [traceAnalyzer:socketTraceAnalyzer]      at java.io.File.createFileExclusively(line:1976)
[testsuite:javaTestsuite] [traceAnalyzer:socketTraceAnalyzer]      at java.io.File.createNewFile(line:823)
[testsuite:javaTestsuite] [traceAnalyzer:socketTraceAnalyzer]      at com.microej.fs.tests.integration.TestFile.TestWriteBigFile(line:48)
[testsuite:javaTestsuite] [traceAnalyzer:socketTraceAnalyzer]      at com.microej.fs.tests.integration.TestFile.main(line:31)
[testsuite:javaTestsuite] [traceAnalyzer:socketTraceAnalyzer]      at java.lang.MainThread.run(line:850)
[testsuite:javaTestsuite] [traceAnalyzer:socketTraceAnalyzer]      at java.lang.Thread.runWrapper(line:464)
[testsuite:javaTestsuite]      [echo] Execution of script 'C:\git\bsp\projects\microej\scripts\run.bat' done.
[testsuite:javaTestsuite] [traceAnalyzer:socketTraceAnalyzer]      at java.lang.Thread.callWrapper(line:449)
[testsuite:javaTestsuite] [traceAnalyzer:socketTraceAnalyzer] Error : com.microej.fs.tests.integration.TestFile TestWriteBigFile
[testsuite:javaTestsuite] [traceAnalyzer:socketTraceAnalyzer]  ( == false ) , expected true

Thanks for your help,

Philip

Hi Philip,

When an ej.sni.NativeIOException is thrown, the error code can be either an error code defined in the FS foundation library or an error code defined in the native FS library. All the error codes mentioned in this documentation are only defined in the FS foundation library.

In your case, the error code -12 probably comes from the native FS library on which you ported the FS foundation library.

Could you please check in your native FS library if this error code exists and what it corresponds to?

Anselme G.

Indeed I found that the error was in my implementation and found what was actually the underlying error.

Thanks Anselme !