aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-01-01 12:14:56 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-01-01 12:14:56 -0200
commitc6f7181e910b6b2ff1346b5486a31be87b1da5af (patch)
tree92cc716487c83ecd9860444f23fd55ef65358cbb /manual
parent437a5b07d415e1a74160ddfd804017171d6cc5cb (diff)
downloadlua-c6f7181e910b6b2ff1346b5486a31be87b1da5af.tar.gz
lua-c6f7181e910b6b2ff1346b5486a31be87b1da5af.tar.bz2
lua-c6f7181e910b6b2ff1346b5486a31be87b1da5af.zip
No more LUA_ERRGCMM errors
Errors in finalizers (__gc metamethods) are never propagated. Instead, they generate a warning.
Diffstat (limited to 'manual')
-rw-r--r--manual/manual.of26
1 files changed, 9 insertions, 17 deletions
diff --git a/manual/manual.of b/manual/manual.of
index 196ea1ef..d64f0f1a 100644
--- a/manual/manual.of
+++ b/manual/manual.of
@@ -722,8 +722,6 @@ Lua calls the finalizers of all objects marked for finalization,
722following the reverse order that they were marked. 722following the reverse order that they were marked.
723If any finalizer marks objects for collection during that phase, 723If any finalizer marks objects for collection during that phase,
724these marks have no effect. 724these marks have no effect.
725If any finalizer raises an error during that phase,
726its execution is interrupted but the error is ignored.
727 725
728Finalizers cannot yield. 726Finalizers cannot yield.
729 727
@@ -2645,8 +2643,7 @@ by looking only at its arguments
2645The third field, @T{x}, 2643The third field, @T{x},
2646tells whether the function may raise errors: 2644tells whether the function may raise errors:
2647@Char{-} means the function never raises any error; 2645@Char{-} means the function never raises any error;
2648@Char{m} means the function may raise out-of-memory errors 2646@Char{m} means the function may raise only out-of-memory errors;
2649and errors running a finalizer;
2650@Char{v} means the function may raise the errors explained in the text; 2647@Char{v} means the function may raise the errors explained in the text;
2651@Char{e} means the function can run arbitrary Lua code, 2648@Char{e} means the function can run arbitrary Lua code,
2652either directly or through metamethods, 2649either directly or through metamethods,
@@ -3364,12 +3361,6 @@ syntax error during precompilation;}
3364@item{@Lid{LUA_ERRMEM}| 3361@item{@Lid{LUA_ERRMEM}|
3365@x{memory allocation (out-of-memory) error};} 3362@x{memory allocation (out-of-memory) error};}
3366 3363
3367@item{@Lid{LUA_ERRGCMM}|
3368error while running a @idx{__gc} metamethod.
3369(This error has no relation with the chunk being loaded.
3370It is generated by the garbage collector.)
3371}
3372
3373} 3364}
3374 3365
3375The @id{lua_load} function uses a user-supplied @id{reader} function 3366The @id{lua_load} function uses a user-supplied @id{reader} function
@@ -3564,13 +3555,6 @@ For such errors, Lua does not call the @x{message handler}.
3564error while running the @x{message handler}. 3555error while running the @x{message handler}.
3565} 3556}
3566 3557
3567@item{@defid{LUA_ERRGCMM}|
3568error while running a @idx{__gc} metamethod.
3569For such errors, Lua does not call the @x{message handler}
3570(as this kind of error typically has no relation
3571with the function being called).
3572}
3573
3574} 3558}
3575 3559
3576} 3560}
@@ -6298,6 +6282,8 @@ The current value of this variable is @St{Lua 5.4}.
6298@LibEntry{warn (message)| 6282@LibEntry{warn (message)|
6299 6283
6300Emits a warning with the given message. 6284Emits a warning with the given message.
6285Note that messages not ending with an end-of-line
6286are assumed to be continued by the message in the next call.
6301 6287
6302} 6288}
6303 6289
@@ -8773,6 +8759,12 @@ so there is no need to check whether they are using the same
8773address space.) 8759address space.)
8774} 8760}
8775 8761
8762@item{
8763The constant @Lid{LUA_ERRGCMM} was removed.
8764Errors in finalizers are never propagated;
8765instead, they generate a warning.
8766}
8767
8776} 8768}
8777 8769
8778} 8770}