Skip to content

Commit be82ef2

Browse files
committed
Bringing back README to its original state, with the addition of the TravisCI status image
1 parent efd49ce commit be82ef2

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

README.md

-22
Original file line numberDiff line numberDiff line change
@@ -97,30 +97,8 @@ function Point:__tostring()
9797
end
9898
```
9999

100-
### Returning constructor errors
101-
```lua
102-
Rect = Point:extend()
103-
104-
function Rect:new(x, y, width, height)
105-
if width > 100 then
106-
return nil, "Width can't be greater than 100"
107-
end
108-
109-
Rect.super.new(self, x, y)
110-
self.width = width or 0
111-
self.height = height or 0
112-
end
113-
114-
115-
local rect, err = Rect(10, 20, 200, 200)
116-
if not rect then
117-
print(err) -- The err variable contains the error message
118-
end
119-
```
120-
121100

122101
## License
123102

124103
This module is free software; you can redistribute it and/or modify it under
125104
the terms of the MIT license. See [LICENSE](LICENSE) for details.
126-

0 commit comments

Comments
 (0)