yaffs working on the timothy_tests. just need to save the current state of the program.
[yaffs2.git] / direct / timothy_tests / error_handler.c
1 #include "error_handler.h"
2
3 void yaffs_check_for_errors(char output, buffer *message_buffer,char error_message[],char success_message[])
4 {
5         if (output==-1)
6         {
7                 add_to_buffer(message_buffer, "error##########",MESSAGE_LEVEL_ERROR);
8                 add_to_buffer(message_buffer, error_message,MESSAGE_LEVEL_ERROR);
9                 add_to_buffer(message_buffer, "error_code",MESSAGE_LEVEL_ERROR);
10                  printf("%d\n",yaffs_get_error());              
11
12                 //print_buffer(message_buffer,PRINT_ALL);
13         
14         }
15         else{
16                 add_to_buffer(message_buffer, success_message,MESSAGE_LEVEL_BASIC_TASKS);
17         }
18                 
19 }