Comments (4)
That could be something I can potentially improve on. I thought I had that but it looks like I'm wrong. If the error less throws contains a property for the line number the error occured on, ect there's not reason why I can't expose that too. Thanks for the feedback. I would find this very helpful too!
from less-sbt.
I just tried with this mess:
case e : JavaScriptException =>
println(e.details())
e.getValue match {
case v: Scriptable =>
val props = "message name type filename line column callLine callExtract stack extract".split(" ").toSeq
val values = props.map(p => (p, if (v.has(p, v)) Some(v.get(p, v)) else None))
println(values)
println(v.getIds.mkString(", "))
//println(ScriptRuntime.defaultObjectToSource())
val toSource = ScriptableObject.getProperty(v, "toSource").asInstanceOf[Function]
val source = println(toSource.call(ctx, scope, v, ScriptRuntime.emptyArgs))
val extract = v.get("extract", v).asInstanceOf[NativeArray]
val ex = (0 until extract.getLength.toInt) map (i => extract.get(i))
println(ex)
sys.error(ScriptableObject.getProperty(v, "message").toString)
And that's what I'm getting out of there:
[object Object]
ArrayBuffer((message,Some(error evaluating function `darken`)), (name,None), (type,Some(org.mozilla.javascript.Undefined@42538425)), (filename,Some(null)), (line,Some(239.0)), (column,Some(10.0)), (callLine,Some(org.mozilla.javascript.Undefined@42538425)), (callExtract,Some(org.mozilla.javascript.Undefined@42538425)), (stack,Some(org.mozilla.javascript.Undefined@42538425)), (extract,Some(org.mozilla.javascript.NativeArray@7908bb27)))
type, message, filename, index, line, callLine, callExtract, stack, column, extract
({type:undefined, message:"error evaluating function `darken`", filename:null, index:4969, line:239, callLine:undefined, callExtract:undefined, stack:undefined, column:10, extract:["\t\t\tborder-bottom: 1/14em solid darken(@cmhb, 20%);", "\t\t\tcolor: darken(white, 2%);", "\t\t\tfont-size: 12/14em;"]})
Vector( border-bottom: 1/14em solid darken(@cmhb, 20%);, color: darken(white, 2%);, font-size: 12/14em;)
from less-sbt.
Whoa thanks! I can't really look at this at work. The soonest I can look into this issue is tonight.
from less-sbt.
Yes, of course. There's no hurry.
from less-sbt.
Related Issues (20)
- Compiled JS artifacts not available anymore in 0.1.6 HOT 4
- Make clear what repository holds the artifact HOT 12
- Version number of less in less-sbt less than official less version HOT 7
- Can't force less recompilation HOT 7
- try/catch is a poor design idiom. prefer either HOT 1
- factor out compiler wrapper HOT 1
- Compile Error: Method "doctest" not found in "org.mozilla.javascript.tools.shell.Global" HOT 9
- Problems using with xsbt-web-plugin…
- Unicode symbols HOT 7
- lesscss 1.3.3 support HOT 2
- Compile error when updating to Bootstrap 2.3.2 HOT 11
- Multiple root sources HOT 2
- Not working for Bootstrap 3.0 ? HOT 9
- lesst dependency not available HOT 2
- CSS output file contains just 'null' HOT 11
- Minifier doesn't work HOT 2
- Version in instruction on landing page is not deployed? HOT 2
- Regular and minified output HOT 1
- Multiple css files
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 less-sbt.