Skip to content

Commit 658c8da

Browse files
committed
Don't store a separate error / stack string
1 parent 41ed3c2 commit 658c8da

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

studio/include/studio/result.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class Shape;
2929

3030
struct Error {
3131
QString error;
32-
QString stack;
3332
QRect range;
3433
};
3534

studio/src/editor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ void Editor::onInterpreterDone(Result r)
142142

143143
emit(shapes(r.shapes));
144144
} else {
145-
setResult(Color::red, r.error.error + "\n\nStack trace:\n" + r.error.stack);
145+
setResult(Color::red, r.error.error);
146146

147147
// Add new selections for errors in the script doc
148148
QTextCursor c(script_doc);

studio/src/guile/interpreter.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,10 @@ void Interpreter::eval(QString script)
247247
const int end_col = scm_to_int(scm_cdr(after));
248248

249249
out.error = Error {
250-
QString(str), QString(stack),
251-
QRect(start_col, start_row,
252-
end_col - start_col + 1,
253-
end_row - start_row) };
250+
QString(str) + "\n\nStack trace:\n" + QString(stack),
251+
QRect(start_col, start_row,
252+
end_col - start_col + 1,
253+
end_row - start_row) };
254254
free(str);
255255
free(stack);
256256
}

studio/src/python/interpreter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ void Interpreter::eval(QString script)
535535
const auto s = PyObject_Str(value);
536536
const auto ws = PyUnicode_AsWideCharString(s, NULL);
537537
PyErr_Print();
538-
out.error = {QString::fromWCharArray(ws), "", QRect()};
538+
out.error = {QString::fromWCharArray(ws), QRect()};
539539
PyMem_Free(ws);
540540
Py_XDECREF(s);
541541
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy