try.c
787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*---------------------------------------------------------------------*
Copyright (C) 1998 Nintendo.
$RCSfile: try.c,v $
$Revision: 1.1.1.1 $
$Date: 2002/05/02 03:27:30 $
*---------------------------------------------------------------------*/
/*
try.c - 㳰饹
*/
/* pre-process */
#include "main.h"
#include "htry.h"
#include "hdd.h"
/* implmentations */
void
try_assert(u8 * str , s32 i)
{
#ifdef DEBUG
if(!i)
{
osSyncPrintf("catch exception %s \n",str );
osStopThread(0);
while(1);
}
#else
str = str;
i = i;
#endif
return;
}
s32
try_warning(u8 * str , s32 i)
{
#ifdef DEBUG
if(!i)
{
osSyncPrintf("warning ! catch exception %s \n",str );
}
#else
str = str;
#endif
return !i;
}
/* */