1
2
3
4
5
6
7
8
9
10
11 package com.legstar.coxb.convert.simple;
12
13 import com.legstar.coxb.CobolContext;
14 import com.legstar.coxb.ICobolBinding;
15 import com.legstar.coxb.convert.CobolConversionException;
16 import com.legstar.coxb.host.HostException;
17
18
19
20
21
22
23
24 public abstract class CobolSimpleConverter {
25
26
27 private CobolContext mCobolContext;
28
29
30
31
32 public CobolSimpleConverter(final CobolContext cobolContext) {
33 mCobolContext = cobolContext;
34 }
35
36
37
38
39 public CobolContext getCobolContext() {
40 return mCobolContext;
41 }
42
43
44
45
46 public void setCobolContext(final CobolContext cobolContext) {
47 mCobolContext = cobolContext;
48 }
49
50
51
52
53
54
55
56 public void throwHostException(
57 final ICobolBinding ce,
58 final CobolConversionException e)
59 throws HostException {
60 throw (new HostException("ConversionException for element:"
61 + ce.getBindingName()
62 + " Cobol name:" + ce.getCobolName()
63 + " Reason:" + e.getMessage()));
64
65 }
66 }