Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
python-cellframe
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
python-cellframe
Commits
4590549f
Commit
4590549f
authored
4 weeks ago
by
Constantin P.
💬
Browse files
Options
Downloads
Plain Diff
Merge branch 'hotfix-log' into 'master'
log fix See merge request
!453
parents
b6468582
016adc01
No related branches found
No related tags found
1 merge request
!453
log fix
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CellFrame/python-cellframe_common.c
+3
-12
3 additions, 12 deletions
CellFrame/python-cellframe_common.c
include/python-cellframe_common.h
+1
-1
1 addition, 1 deletion
include/python-cellframe_common.h
with
4 additions
and
13 deletions
CellFrame/python-cellframe_common.c
+
3
−
12
View file @
4590549f
...
...
@@ -7,10 +7,6 @@
#include
"python-cellframe_common.h"
void
_PyErr_logIt
(
const
dap_log_level_t
a_level
,
const
char
*
a_tag
,
const
char
*
a_msg
){
_log_it
(
"
\0
"
,
0
,
a_tag
,
a_level
,
"%s"
,
a_msg
);
}
char
*
_PyErr_get_stacktrace
(
PyObject
*
a_obj
){
if
(
!
a_obj
){
return
"No stack trace"
;
...
...
@@ -46,14 +42,9 @@ void python_error_in_log_it(const char *a_tag){
const
char
*
l_str_value
=
PyBytes_AS_STRING
(
exect_value_str
);
char
*
l_str
=
dap_strdup_printf
(
"An exception occurred while executing a Python script.
\n
"
"
\t
%s
\n
%s"
,
l_str_value
?
l_str_value
:
"(null)"
,
trackback
?
_PyErr_get_stacktrace
(
trackback
)
:
"(null)"
);
_PyErr_logIt
(
L_ERROR
,
a_tag
,
l_str
);
DAP_DELETE
(
l_str
);
_PyErr_logIt
(
L_ERROR
,
a_tag
,
"An exception occurred while executing a Python script.
\n
"
"
\t
%s
\n
%s"
,
l_str_value
?
l_str_value
:
"(null)"
,
trackback
?
_PyErr_get_stacktrace
(
trackback
)
:
"(null)"
);
PyErr_Restore
(
type
,
value
,
trackback
);
}
...
...
This diff is collapsed.
Click to expand it.
include/python-cellframe_common.h
+
1
−
1
View file @
4590549f
...
...
@@ -7,7 +7,7 @@
#include
"dap_strfuncs.h"
void
python_error_in_log_it
(
const
char
*
a_tag
);
void
_PyErr_logIt
(
const
dap_log
_level
_t
a_
level
,
const
char
*
a_tag
,
const
char
*
a_msg
);
#define
_PyErr_logIt(
a
_level
,
a_
tag, ...) _log_it(NULL, 0, a_tag, a_level, ##__VA_ARGS__)
PyObject
*
python_get_config_item
(
dap_config_t
*
a_config
,
const
char
*
a_section
,
const
char
*
a_key
,
PyObject
*
obj_default
);
#define Py_BuildNone Py_BuildValue("")
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment