Commit 8bc351f39ceec044ab57cff7d37b9806637ac47c

Authored by kevin_fourie
1 parent e32606c2

KTS-2240

"CLONE -PDF Error (SUP-351)"

In progress. Added better error messages.

Committed By: Kevin Fourie
Reviewed By: Conrad Vermeulen



git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@7054 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 6 additions and 1 deletions
bin/openoffice/pdfgen.py
@@ -33,6 +33,11 @@ import uno @@ -33,6 +33,11 @@ import uno
33 import sys 33 import sys
34 from com.sun.star.beans import PropertyValue 34 from com.sun.star.beans import PropertyValue
35 35
  36 +NoConnectionException = uno.getClass("com.sun.star.connection.NoConnectException")
  37 +IllegalArgumentException = uno.getClass("com.sun.star.lang.IllegalArgumentException")
  38 +RuntimeException = uno.getClass("com.sun.star.uno.RuntimeException")
  39 +IOException = uno.getClass("com.sun.star.io.IOException")
  40 +
36 url_original = uno.systemPathToFileUrl(sys.argv[1]) 41 url_original = uno.systemPathToFileUrl(sys.argv[1])
37 url_save = uno.systemPathToFileUrl(sys.argv[2]) 42 url_save = uno.systemPathToFileUrl(sys.argv[2])
38 43
@@ -68,7 +73,7 @@ except IOException, e: @@ -68,7 +73,7 @@ except IOException, e:
68 sys.stderr.write("URL couldn't be found or was corrupt (" + e.Message + ")\n") 73 sys.stderr.write("URL couldn't be found or was corrupt (" + e.Message + ")\n")
69 sys.exit(1) 74 sys.exit(1)
70 except IllegalArgumentException, e: 75 except IllegalArgumentException, e:
71 - sys.stderr.write("Given parameters doesn't conform to the specification ( " + e.Message + ")\n") 76 + sys.stderr.write("Given parameters don't conform to the specification ( " + e.Message + ")\n")
72 sys.exit(1) 77 sys.exit(1)
73 except RuntimeException, e: 78 except RuntimeException, e:
74 sys.stderr.write("An unknown error occured: " + e.Message + "\n") 79 sys.stderr.write("An unknown error occured: " + e.Message + "\n")