Skip to content

Commit 24c74e1

Browse files
author
bogdan.khavronin
committed
ALICE_print fix, isError flag added
1 parent 22c7d12 commit 24c74e1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/alice/alice.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ int alice(Firebird::UtilSvc* uSvc)
557557

558558
if (any_error)
559559
{
560-
ALICE_print(24); // msg 24: Summary of validation errors\n
560+
ALICE_print(24, SafeArg(), false); // msg 24: Summary of validation errors\n
561561

562562
for (int i = 0; i < MAX_VAL_ERRORS; ++i)
563563
{
@@ -637,13 +637,19 @@ void ALICE_upper_case(const TEXT* in, TEXT* out, const size_t buf_size)
637637
// Display a formatted error message
638638
//
639639

640-
void ALICE_print(USHORT number, const SafeArg& arg)
640+
void ALICE_print(USHORT number, const SafeArg& arg, const bool isError)
641641
{
642642
AliceGlobals* tdgbl = AliceGlobals::getSpecific();
643643
if (tdgbl->uSvc->isService())
644644
{
645+
if (!isError)
646+
tdgbl->uSvc->started();
647+
645648
tdgbl->uSvc->getStatusAccessor().setServiceStatus(ALICE_MSG_FAC, number, arg);
646-
tdgbl->uSvc->started();
649+
650+
if (isError)
651+
tdgbl->uSvc->started();
652+
647653
return;
648654
}
649655

src/alice/alice_proto.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ int alice(Firebird::UtilSvc*);
3434
class AliceGlobals;
3535

3636
void ALICE_upper_case(const TEXT*, TEXT*, const size_t);
37-
void ALICE_print(USHORT, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg());
37+
void ALICE_print(USHORT, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg(), const bool isError = true);
3838
void ALICE_error(USHORT, const MsgFormat::SafeArg& arg = MsgFormat::SafeArg());
3939
void ALICE_print_status(bool error, const ISC_STATUS*);
4040
void ALICE_exit(int, AliceGlobals*);

0 commit comments

Comments
 (0)