Lines Matching full:error
127 GError *error;
133 error = NULL;
134 outs = g_file_replace (child, NULL, FALSE, create_flags, NULL, &error);
135 g_assert_no_error (error);
137 error = NULL;
138 res = g_output_stream_close (G_OUTPUT_STREAM (outs), NULL, &error);
148 GError *error;
152 error = NULL;
153 res = g_file_make_directory (child, NULL, &error);
155 g_assert_no_error (error);
164 GError *error;
168 error = NULL;
169 res = g_file_make_symbolic_link (child, points_to, NULL, &error);
171 g_assert_no_error (error);
181 GError *error;
230 error = NULL;
235 NULL, &error);
237 g_assert_no_error (error);
248 error = NULL;
250 g_file_replace (child, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &error);
251 g_assert_no_error (error);
258 error = NULL;
259 res = g_data_output_stream_put_byte (outds, i % 256, NULL, &error);
260 g_assert_no_error (error);
262 error = NULL;
263 res = g_output_stream_close (G_OUTPUT_STREAM (outs), NULL, &error);
264 g_assert_no_error (error);
386 GError *error;
418 error = NULL;
421 NULL, &error);
422 g_assert_no_error (error);
436 error = NULL;
439 &error);
440 g_assert_no_error (error);
445 error = NULL;
446 ins = g_file_read (child, NULL, &error);
448 g_assert_no_error (error);
455 error = NULL;
458 PATTERN_FILE_SIZE, NULL, &error);
459 g_assert_no_error (error);
466 error = NULL;
467 res = g_input_stream_close (G_INPUT_STREAM (ins), NULL, &error);
468 g_assert_no_error (error);
484 GError *error;
494 error = NULL;
498 &error);
500 g_assert_no_error (error);
502 error = NULL;
503 info = g_file_enumerator_next_file (enumerator, NULL, &error);
504 while ((info) && (!error))
532 error = NULL;
533 info = g_file_enumerator_next_file (enumerator, NULL, &error);
535 g_assert_no_error (error);
537 error = NULL;
538 res = g_file_enumerator_close (enumerator, NULL, &error);
540 g_assert_no_error (error);
571 GError *error;
602 error = NULL;
606 NULL, &error);
611 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND);
616 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_DIRECTORY);
622 error = NULL;
623 info = g_file_enumerator_next_file (enumerator, NULL, &error);
625 g_assert_no_error (error);
626 /* no items should be found, no error should be logged */
629 if (error)
630 g_error_free (error);
634 error = NULL;
635 res = g_file_enumerator_close (enumerator, NULL, &error);
637 g_assert_no_error (error);
651 GError *error;
662 error = NULL;
669 G_FILE_COPY_NONE), NULL, NULL, NULL, &error);
673 NULL, NULL, &error);
675 if (error)
676 log (" res = %d, error code %d = %s\n", res, error->code,
677 error->message);
684 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_EXISTS);
692 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_WOULD_RECURSE);
694 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_DIRECTORY);
701 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_WOULD_RECURSE);
708 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND);
715 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED);
717 /* no error should be found, all exceptions defined above */
721 g_assert_no_error (error);
724 if (error)
725 g_error_free (error);
801 GError *error;
826 error = NULL;
830 os = g_file_create (child, item.create_flags, NULL, &error);
834 &error);
836 os = g_file_append_to (child, item.create_flags, NULL, &error);
839 if (error)
840 log (" error code %d = %s\n", error->code, error->message);
846 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_EXISTS);
852 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_EXISTS);
854 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_IS_DIRECTORY);
859 g_assert_no_error (error);
862 if (error)
863 g_error_free (error);
867 error = NULL;
869 g_output_stream_close (G_OUTPUT_STREAM (os), NULL, &error);
870 if (error)
871 log (" g_output_stream_close: error %d = %s\n",
872 error->code, error->message);
874 g_assert_no_error (error);
887 GError *error;
913 error = NULL;
914 input_stream = g_file_read (child, NULL, &error);
921 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND);
926 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_IS_DIRECTORY);
931 g_assert_no_error (error);
934 if (error)
935 g_error_free (error);
939 error = NULL;
942 &error);
944 g_assert_no_error (error);
958 GError *error;
986 error = NULL;
988 res = g_file_delete (child, NULL, &error);
990 res = g_file_trash (child, NULL, &error);
996 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_EMPTY);
1001 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND);
1006 g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND);
1009 if (error)
1011 log (" result = %d, error = %s\n", res, error->message);
1012 g_error_free (error);
1026 GError *error;
1034 error = NULL;
1038 &error);
1042 error = NULL;
1043 info = g_file_enumerator_next_file (enumerator, NULL, &error);
1044 while ((info) && (!error))
1056 error = NULL;
1057 res = g_file_delete (descend, NULL, &error);
1061 error = NULL;
1062 info = g_file_enumerator_next_file (enumerator, NULL, &error);
1064 g_assert_no_error (error);
1066 error = NULL;
1067 res = g_file_enumerator_close (enumerator, NULL, &error);
1069 g_assert_no_error (error);
1096 GError *error;
1135 error = NULL;
1138 if (!g_option_context_parse (context, &argc, &argv, &error))
1140 g_print ("option parsing failed: %s\n", error->message);
1150 g_print ("error: target path was not specified\n");