Skip to content

Commit 01492f5

Browse files
committed
Merge pull request #1006 from am11/master
Code: Fixes dynamic exception as per C++11 specs
2 parents b87f4c7 + 7d19487 commit 01492f5

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

error_handling.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ namespace Sass {
88
: type(type), pstate(pstate), message(message)
99
{ }
1010

11-
void error(string msg, ParserState pstate) throw(Sass_Error)
11+
void error(string msg, ParserState pstate)
1212
{
1313
throw Sass_Error(Sass_Error::syntax, pstate, msg);
1414
}
1515

16-
void error(string msg, ParserState pstate, Backtrace* bt) throw(Sass_Error)
16+
void error(string msg, ParserState pstate, Backtrace* bt)
1717
{
1818

1919
Backtrace top(bt, pstate, "");

error_handling.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ namespace Sass {
2121

2222
};
2323

24-
void error(string msg, ParserState pstate) throw(Sass_Error);
25-
void error(string msg, ParserState pstate, Backtrace* bt) throw(Sass_Error);
24+
void error(string msg, ParserState pstate);
25+
void error(string msg, ParserState pstate, Backtrace* bt);
2626

2727
}
2828

sass_context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ extern "C" {
188188
return str == NULL ? "" : str;
189189
}
190190

191-
static void copy_strings(const std::vector<std::string>& strings, char*** array) throw() {
191+
static void copy_strings(const std::vector<std::string>& strings, char*** array) {
192192
int num = static_cast<int>(strings.size());
193193
char** arr = (char**) malloc(sizeof(char*) * (num + 1));
194194
if (arr == 0) throw(bad_alloc());

win/libsass.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
<WarningLevel>Level3</WarningLevel>
103103
<Optimization>Disabled</Optimization>
104104
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
105+
<ExceptionHandling>SyncCThrow</ExceptionHandling>
105106
</ClCompile>
106107
<Link>
107108
<SubSystem>Console</SubSystem>
@@ -115,6 +116,7 @@
115116
<WarningLevel>Level3</WarningLevel>
116117
<Optimization>Disabled</Optimization>
117118
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
119+
<ExceptionHandling>SyncCThrow</ExceptionHandling>
118120
</ClCompile>
119121
<Link>
120122
<SubSystem>Console</SubSystem>
@@ -130,6 +132,7 @@
130132
<FunctionLevelLinking>true</FunctionLevelLinking>
131133
<IntrinsicFunctions>true</IntrinsicFunctions>
132134
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
135+
<ExceptionHandling>SyncCThrow</ExceptionHandling>
133136
</ClCompile>
134137
<Link>
135138
<SubSystem>Console</SubSystem>
@@ -147,6 +150,7 @@
147150
<FunctionLevelLinking>true</FunctionLevelLinking>
148151
<IntrinsicFunctions>true</IntrinsicFunctions>
149152
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
153+
<ExceptionHandling>SyncCThrow</ExceptionHandling>
150154
</ClCompile>
151155
<Link>
152156
<SubSystem>Console</SubSystem>

0 commit comments

Comments
 (0)