2018-09-28 17:54:21 +02:00
|
|
|
// OpenSTA, Static Timing Analyzer
|
2024-01-12 01:34:49 +01:00
|
|
|
// Copyright (c) 2024, Parallax Software, Inc.
|
2018-09-28 17:54:21 +02:00
|
|
|
//
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2022-01-04 18:17:08 +01:00
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
2018-09-28 17:54:21 +02:00
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU General Public License
|
2022-01-04 18:17:08 +01:00
|
|
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2018-09-28 17:54:21 +02:00
|
|
|
|
|
|
|
|
%exception {
|
|
|
|
|
try { $function }
|
2019-05-08 22:23:59 +02:00
|
|
|
catch (std::bad_alloc &) {
|
2018-09-28 17:54:21 +02:00
|
|
|
fprintf(stderr, "Error: out of memory.\n");
|
2020-12-25 01:31:52 +01:00
|
|
|
exit(1);
|
2018-09-28 17:54:21 +02:00
|
|
|
}
|
2025-01-17 20:20:19 +01:00
|
|
|
catch (ExceptionMsg &excp) {
|
|
|
|
|
if (!excp.suppressed()) {
|
|
|
|
|
Tcl_ResetResult(interp);
|
|
|
|
|
Tcl_AppendResult(interp, "Error: ", excp.what(), nullptr);
|
|
|
|
|
}
|
|
|
|
|
return TCL_ERROR;
|
|
|
|
|
}
|
2020-02-16 02:10:24 +01:00
|
|
|
catch (std::exception &excp) {
|
2020-03-16 15:40:15 +01:00
|
|
|
Tcl_ResetResult(interp);
|
|
|
|
|
Tcl_AppendResult(interp, "Error: ", excp.what(), nullptr);
|
2020-02-16 02:10:24 +01:00
|
|
|
return TCL_ERROR;
|
|
|
|
|
}
|
2018-09-28 17:54:21 +02:00
|
|
|
}
|