You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I apologise if this has already been reported, I did search the issues but there are lots related to "throw". Also, this may not be an issue, but I wanted to double check anyway.
When throwing exceptions the following syntax does not compile correctly:
if 1 then throw
type: 'a'
msg: 'b'
The above coffeescript compiles to the following:
if (1) {
throw {
type: 'a'
};
}
({
msg: 'b'
});
In order for this to compile we must use one of the following variations:
if 1 then throw type: 'a', msg: 'b'
or
if 1 then throw {
type: 'a'
msg: 'b'
}
or
if 1
throw
type: 'a',
msg: 'b'
Is this intended? Or are we missing out on a nicer syntax for throwing exceptions?