433 sys.stderr.write("{0} error: {1}\n".format(file, v[1])) |
434 sys.stderr.write("{0} error: {1}\n".format(file, v[1])) |
434 continue |
435 continue |
435 except ImportError as v: |
436 except ImportError as v: |
436 sys.stderr.write("{0} error: {1}\n".format(file, v)) |
437 sys.stderr.write("{0} error: {1}\n".format(file, v)) |
437 continue |
438 continue |
|
439 except Exception as ex: |
|
440 sys.stderr.write( |
|
441 "{0} error while parsing: {1}\n".format( |
|
442 file, str(ex) |
|
443 ) |
|
444 ) |
|
445 raise |
438 |
446 |
439 f = FileSystemUtilities.joinext( |
447 f = FileSystemUtilities.joinext( |
440 os.path.join(outputDir, moduleDocument.name()), ".html" |
448 os.path.join(outputDir, moduleDocument.name()), ".html" |
441 ) |
449 ) |
442 |
450 |
456 try: |
464 try: |
457 with open(f, "w", encoding="utf-8", newline=newline) as out: |
465 with open(f, "w", encoding="utf-8", newline=newline) as out: |
458 out.write(doc) |
466 out.write(doc) |
459 except OSError as v: |
467 except OSError as v: |
460 sys.stderr.write("{0} error: {1}\n".format(file, v[1])) |
468 sys.stderr.write("{0} error: {1}\n".format(file, v[1])) |
|
469 except Exception as ex: |
|
470 sys.stderr.write( |
|
471 "{0} error while writing: {1}\n".format( |
|
472 file, str(ex) |
|
473 ) |
|
474 ) |
|
475 raise |
461 else: |
476 else: |
462 sys.stdout.write("{0} ok\n".format(f)) |
477 sys.stdout.write("{0} ok\n".format(f)) |
|
478 |
|
479 sys.stdout.flush() |
|
480 sys.stderr.flush() |
|
481 |
|
482 sys.stdout.write("code documentation generated") |
463 |
483 |
464 sys.stdout.flush() |
484 sys.stdout.flush() |
465 sys.stderr.flush() |
485 sys.stderr.flush() |
466 |
486 |
467 # write index files |
487 # write index files |