|
@@ -289,7 +289,7 @@ Whenever there is an error,
|
|
|
an @def{error object}
|
|
|
is propagated with information about the error.
|
|
|
Lua itself only generates errors whose error object is a string,
|
|
|
-but programs may generate errors with
|
|
|
+but programs can generate errors with
|
|
|
any value as the error object.
|
|
|
It is up to the Lua program or its host to handle such error objects.
|
|
|
For historical reasons,
|
|
@@ -298,7 +298,7 @@ even though it does not have to be a string.
|
|
|
|
|
|
|
|
|
When you use @Lid{xpcall} (or @Lid{lua_pcall}, in C)
|
|
|
-you may give a @def{message handler}
|
|
|
+you can give a @def{message handler}
|
|
|
to be called in case of errors.
|
|
|
This function is called with the original error object
|
|
|
and returns a new error object.
|
|
@@ -343,7 +343,7 @@ which is then called a @def{metamethod}.
|
|
|
In the previous example, the key is the string @St{__add}
|
|
|
and the metamethod is the function that performs the addition.
|
|
|
Unless stated otherwise,
|
|
|
-a metamethod may in fact be any @x{callable value},
|
|
|
+a metamethod can in fact be any @x{callable value},
|
|
|
which is either a function or a value with a @idx{__call} metamethod.
|
|
|
|
|
|
You can query the metatable of any value
|
|
@@ -1417,7 +1417,7 @@ labels in Lua are considered statements too:
|
|
|
|
|
|
A label is visible in the entire block where it is defined,
|
|
|
except inside nested functions.
|
|
|
-A goto may jump to any visible label as long as it does not
|
|
|
+A goto can jump to any visible label as long as it does not
|
|
|
enter into the scope of a local variable.
|
|
|
A label should not be declared
|
|
|
where a label with the same name is visible,
|
|
@@ -4488,7 +4488,7 @@ but can contain other zeros in its body.
|
|
|
|
|
|
This function can raise memory errors only
|
|
|
when converting a number to a string
|
|
|
-(as then it has to create a new string).
|
|
|
+(as then it may create a new string).
|
|
|
|
|
|
}
|
|
|
|