Comments (8)
Hi @ian-kelling ,
The same script works for me:
# cat 1.sh
#!/bin/bash
source "$( cd "${BASH_SOURCE[0]%/*}" && pwd )/lib/oo-bootstrap.sh"
import util/exception
ta() {
touch /tmp/a/untouchable
}
ta
Output:
# ./1.sh
touch: cannot touch â/tmp/a/untouchableâ: No such file or directory
â UNCAUGHT EXCEPTION: /tmp/a/untouchable (1)
î ⦠touch /tmp/a/untouchable [1.sh:7]
î ⦠ta [1.sh:9]
â¡ Press [CTRL+C] to exit or [Return] to continue execution.
â Continuing...
â UNCAUGHT EXCEPTION: ta (1)
î ⦠[[ $index -lt $backtraceNo ]] [1.sh:170]
î â [1.sh:170]
â¡ Press [CTRL+C] to exit or [Return] to continue execution.
â Continuing...
Run from root
bash 4.2.46(2)-release
bash-oo-framework from master branch: https://github.com/niieani/bash-oo-framework/tree/master
from bash-oo-framework.
@ian-kelling I guess something is wrong with the way your terminal prints -- either unicode characters or colors, and we don't manage to catch that it's a non-colored terminal.
You could try forcing the unicode off by setting this global variable: NO_UNICODE=1
. Let me know if this helps.
from bash-oo-framework.
What kind of terminal are you using?
I'm runing GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
I ran this in konsole, mate-terminal, and xterm all with export NO_UNICODE=1. All had the same result. All terminals print color just fine.
from bash-oo-framework.
And if I run ./x.sh |& out, i can inspect the file and see that those empty lines are just empty.
from bash-oo-framework.
correction: ./x.sh |& tee out
from bash-oo-framework.
That's super odd @ian-kelling. I'm not able to reproduce it. I'd have to try it in a linux virtual machine, but you've been the only one so far to report this behavior.
from bash-oo-framework.
I can reproduce this too, my setup is:
- bash-oo-framework: v2.1
- Ubuntu 16.04, Linux kernel 4.4.0-142-generic
- terminals: Terminator 0.98 and xfce4-terminal v0.6.3 (Xfce 4.12)
- Bash version 4.3.48(1)-release
from bash-oo-framework.
It looks like the problem is only present in non-fancy (non-colorized) output mode.
I checked that tput colors
returns 8
on my terminal, so UI.Color.IsAvailable
is 0
. I also checked that changing $TERM
from xterm
to xterm-256color
(which seems valid for my terminal) restores the correct output - backtrace is now fully visible.
from bash-oo-framework.
Related Issues (20)
- Is the project dead? HOT 3
- Sorry, a bit cheeky/impolite... HOT 2
- error handling with throw / command_not_found_handle HOT 3
- Unbound variables cause a crash when running examples with 'set -u' HOT 3
- [bug?] `throw` is said to be 'undefined command' when `import` fail HOT 5
- Catch exception from Classes doesn't work HOT 7
- Inconsistent array assignments HOT 3
- Translating README into Japanese
- for people who want to use Bpkg to install this framework HOT 1
- example/trycatch.sh doesn't work as expected
- Make wiki page
- [Question] Does value of '__primitive_extension_fingerprint' have special meaning?
- update readme instructions for namedParameters
- util/exception.sh shows stack trace as expected but don't exit on Ctrl+C HOT 2
- False boolean not working HOT 1
- Referring this in Human example class doesn't work as described HOT 1
- Exception messages are invisible in light theme mode in Shell console.
- [Question] Is this project still alive? HOT 6
- [Discussion] Log API
- Using a variable for an Object name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bash-oo-framework.