Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ module Escort
Escort::Logger.output.puts "Options: #{options}"
Escort::Logger.output.puts "Command options: #{command_options}"
Escort::Logger.output.puts "Arguments: #{arguments}"
Escort::Logger.error.error "Example of how to log to STDERR"
if config
Escort::Logger.output.puts "User config: #{config}"
end
Expand All @@ -678,6 +679,14 @@ These should give you hand in implementing the functionality you need, but most

There is an examples directory where you can have a play with a whole bunch of little 'Escort' apps, from a very basic one with no options to more complex nested command suites with all the trimmings. Most of them call the `ExampleCommand` which lives in `examples/commands`. Have a read/play to learn, or just copy/paste bits straight into your apps.

## Error Handling
Escort handles all errors encountered for you and doesn't print out the call stack unless you tell it to. By default, your users will receive error messages similar to this:
```
undefined method `self' for #<Foo:0x007fb9049f0fa0>
```

To generate a call stack when errors are encountered, start your program with the built-in global option `--verbosity debug`.

## More In-Depth

TODO
Expand Down